Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,19 @@ on:
pull_request:
branches: [main]
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
name: build (${{ matrix.python-version }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [ "3.11", "3.12" ]
python-version: ["3.11","3.12"]

steps:
- name: Checkout
Expand Down Expand Up @@ -50,18 +52,17 @@ jobs:

- name: Package & smoke-test CLI
run: |
set -euxo pipefail
poetry build
poetry run python -m pip install .
poetry run python -c "import sys, diff_risk_dashboard as m; print(sys.version); print(getattr(m, \"__version__\", \"0.0.0\"))"
poetry run python -c "import sys, diff_risk_dashboard as m; print(sys.version); print(getattr(m, '__version__', '0.0.0'))"
rm -rf _intel && mkdir -p _intel
poetry run python -m diff_risk_dashboard.cli examples/sample_apv.json -f md -o _intel/report.md
ls -l _intel/report.md && head -n 5 _intel/report.md

- name: Upload sample report
if: matrix.python-version == '3.12'
if: matrix.python-version == '3.12'
if: always()
if: ${{ matrix.python-version == '3.12' }}
uses: actions/upload-artifact@v4
with:
name: sample-report
path: _intel/report.md
if-no-files-found: error
44 changes: 34 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,45 @@ on:
pull_request:
push:
branches: [ main ]

jobs:
python:
name: python (${{ matrix.python-version }})
runs-on: ubuntu-latest
strategy:
matrix: { python-version: ["3.11","3.12"] }
fail-fast: false
matrix:
python-version: ["3.11","3.12"]

steps:
- uses: actions/checkout@v5
- uses: actions/setup-python@v5
with: { python-version: ${{ matrix.python-version }} }
- run: python -m pip install -U pip
- run: pip install pytest mypy ruff black
- run: ruff check .
- run: black --check .
- run: pytest -q
- name: Checkout
uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Upgrade pip
run: python -m pip install -U pip

- name: Install tools

- name: Install project
run: pip install -e .
run: pip install pytest mypy ruff black

- name: Ruff
run: ruff check .

- name: Black (check)
run: black --check .

- name: Pytest
env:
PYTHONPATH: src
run: pytest -q

- name: mypy (solo 3.12)
if: matrix.python-version == '3.12'
if: ${{ matrix.python-version == '3.12' }}
run: mypy src
Loading