Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: psadi/bbcli
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 0.6.2
Choose a base ref
...
head repository: psadi/bbcli
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
Loading
65 changes: 46 additions & 19 deletions .github/workflows/ci.yml → .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -39,42 +39,67 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.12"]
python-version: ["3.13"]
os: ["ubuntu-latest", "windows-latest", "macos-latest"]
language: ["python"]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up PDM
uses: pdm-project/setup-pdm@v4
- name: Cache Pip Dependencies
if: ${{ github.ref == 'refs/heads/main' }}
uses: actions/cache@v4
with:
python-version: ${{ matrix.python-version }}
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/*.py') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Cache .venv
if: ${{ github.ref == 'refs/heads/main' }}
uses: actions/cache@v4
with:
path: .venv
key: ${{ runner.os }}-venv-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-venv-
- name: Cache .tox
if: ${{ github.ref == 'refs/heads/main' }}
uses: actions/cache@v4
with:
path: .tox
key: ${{ runner.os }}-tox-${{ hashFiles('tox.ini') }}
restore-keys: |
${{ runner.os }}-tox-
- name: Install uv
uses: astral-sh/setup-uv@v4

- name: Prepare Environment, Sync Dependences and Run Tox
- name: Prepare Environment, Sync Dependencies and Run Tox
run: |
mkdir -p ~/.config/bb
cp config.ini ~/.config/bb
pdm fix
pdm sync
pdm run tox
uv sync
uv tool install tox --with tox-uv
tox r
- name: SonarCloud Scan
if: ${{ matrix.os == 'ubuntu-latest' }}
uses: sonarsource/sonarcloud-github-action@master
uses: sonarsource/sonarqube-scan-action@v4.0.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
args: |
-Dsonar.projectKey=psadi_bbcli
args: >
-Dsonar.organization=psadi
-Dsonar.python.version=3
-Dsonar.sources=bb
-Dsonar.tests=tests
-Dsonar.projectKey=psadi_bbcli
-Dsonar.sources=bb/
-Dsonar.tests=tests/
-Dsonar.python.coverage.reportPaths=coverage.xml
-Dsonar.exclusions=tests
-Dsonar.test.exclusions=tests/**
-Dsonar.verbose=false
- name: Initialize CodeQL
if: ${{ matrix.os == 'ubuntu-latest' && github.event_name == 'release' }}
@@ -94,7 +119,7 @@ jobs:

- name: Run build and generate artifacts
run: |
pdm build
uv build
- uses: actions/upload-artifact@v4
if: ${{ matrix.os == 'ubuntu-latest' }}
@@ -138,12 +163,12 @@ jobs:

- name: Build Docker Image
run: |
docker build -t docker.io/psadi/bbcli:${{ github.event_name == 'release' && steps.meta.outputs.tags || github.sha }} .
docker build -t docker.io/psadi/bbcli:${{ github.event.release.tag_name || github.sha }} .
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@0.20.0
with:
image-ref: docker.io/psadi/bbcli:${{ github.event_name == 'release' && steps.meta.outputs.tags || github.sha }}
image-ref: docker.io/psadi/bbcli:${{ github.event.release.tag_name || github.sha }}
format: "sarif"
output: "trivy-results.sarif"
exit-code: "1"
@@ -159,4 +184,6 @@ jobs:
- name: Push Docker Image
if: ${{ github.event_name == 'release' }}
run: |
docker push docker.io/psadi/bbcli:${{ github.event_name == 'release' && steps.meta.outputs.tags || github.sha }}
docker tag docker.io/psadi/bbcli:${{ github.event.release.tag_name }} docker.io/psadi/bbcli:latest
docker push docker.io/psadi/bbcli:${{ github.event.release.tag_name }}
docker push docker.io/psadi/bbcli:latest
45 changes: 0 additions & 45 deletions .github/workflows/update-deps.yaml

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -176,3 +176,4 @@ package*.json
.DS_Store
.pdm.toml
.pdm-python
test
25 changes: 23 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -19,21 +19,42 @@

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v5.0.0
hooks:
- id: check-executables-have-shebangs
- id: check-merge-conflict
- id: check-shebang-scripts-are-executable
- id: fix-byte-order-marker
- id: mixed-line-ending
- id: check-docstring-first
- id: end-of-file-fixer
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]
- id: check-merge-conflict
- id: check-toml
- id: check-yaml
- id: fix-encoding-pragma
- id: no-commit-to-branch
args: ["-b", "main"]
- id: requirements-txt-fixer

- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.1.11
rev: v0.7.2
hooks:
- id: ruff
args: [bb, --fix, --exit-non-zero-on-fix]
- id: ruff-format
args: [bb]
- repo: https://github.com/pypa/pip-audit
rev: v2.7.3
hooks:
- id: pip-audit
- repo: https://github.com/astral-sh/uv-pre-commit
rev: 0.5.9
hooks:
- id: uv-export
args: ["--no-hashes", "--no-header", "--output-file=requirements.txt"]
- repo: https://github.com/rhysd/actionlint
rev: v1.7.4
hooks:
- id: actionlint-system
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -17,7 +17,7 @@
# along with this program. If not, see <https://www.gnu.org/licenses/>.
############################################################################

FROM python:3.13.0b3-alpine
FROM python:3.14.0a1-alpine

COPY dist/bb-*.tar.gz bb.tar.gz

Empty file modified LICENSE
100755 → 100644
Empty file.
Loading