ci(deps): bump actions/download-artifact from 4 to 5 #176
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: [ main, develop ] | |
tags: [ 'v*' ] | |
pull_request: | |
branches: [ main, develop ] | |
workflow_call: | |
jobs: | |
test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
python-version: ["3.13"] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install UV | |
uses: astral-sh/setup-uv@v4 | |
with: | |
version: "latest" | |
- name: Install dependencies | |
run: uv sync | |
- name: Run tests with pytest | |
run: uv run pytest -v --cov-report=term-missing --cov-report=xml --cov-report=html | |
shell: bash | |
- name: Upload coverage to Codecov | |
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.13' | |
uses: codecov/codecov-action@v5 | |
with: | |
file: ./coverage.xml | |
flags: unittests | |
name: codecov-umbrella | |
fail_ci_if_error: false | |
token: ${{ secrets.CODECOV_TOKEN }} | |
- name: Upload coverage reports | |
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.13' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: coverage-report | |
path: htmlcov/ | |
- name: Check coverage threshold | |
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.13' | |
run: uv run coverage report --fail-under=90 | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.13" | |
- name: Install UV | |
uses: astral-sh/setup-uv@v4 | |
with: | |
version: "latest" | |
- name: Install dependencies | |
run: uv sync | |
- name: Run ruff linter | |
run: uv run ruff check --output-format=github . | |
- name: Run ruff formatter | |
run: uv run ruff format --check . | |
- name: Run mypy | |
run: uv run mypy src/ --ignore-missing-imports | |
- name: Run bandit security scan | |
run: uv run bandit -r src/ -f txt | |
- name: Run Safety to check for vulnerabilities | |
uses: pyupio/safety-action@v1 | |
with: | |
api-key: ${{ secrets.SAFETY_API_KEY }} | |
continue-on-error: true | |
build: | |
runs-on: ubuntu-latest | |
needs: [test] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.13" | |
- name: Install UV | |
uses: astral-sh/setup-uv@v4 | |
with: | |
version: "latest" | |
- name: Install build dependencies & build | |
run: | | |
uv sync | |
uv build | |
- name: Check dist contents | |
run: ls -la dist/ | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: dist-packages | |
path: dist/ |