Skip to content

Merge pull request #37 from kelsoncm/dependabot/github_actions/codeco… #38

Merge pull request #37 from kelsoncm/dependabot/github_actions/codeco…

Merge pull request #37 from kelsoncm/dependabot/github_actions/codeco… #38

Workflow file for this run

name: QA
on:
push:
branches:
- "*"
pull_request:
schedule:
- cron: "0 6 * * 1"
permissions:
contents: read
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
jobs:
quality:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Set up Python 3.14
uses: actions/setup-python@v6
with:
python-version: "3.14"
- name: Install quality dependencies
run: |
python -m pip install --upgrade pip uv
uv pip install --system --upgrade -e ".[dev]"
- name: Check Python formatting (black + isort)
run: |
black . --check
- name: Lint Markdown
uses: DavidAnson/markdownlint-cli2-action@v23
- name: Lint reStructuredText (doc8)
run: |
doc8 docs --max-line-length=120
- name: Run Semgrep SAST
if: github.event_name == 'pull_request' || github.event_name == 'schedule'
uses: semgrep/semgrep-action@v1
with:
config: p/ci
test:
runs-on: ubuntu-latest
needs: quality
permissions:
contents: read
id-token: write
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
steps:
- uses: actions/checkout@v6
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install CI tools
run: |
python -m pip install --upgrade pip uv
uv pip install --system --upgrade -e ".[dev]"
- name: Install project dependencies
run: pip install -e .
- name: pyfwf - Test with coverage
run: |
pytest --cov=pyfwf --cov-report=xml:coverage.xml --cov-report=term-missing
pytest-coverage-gate --coverage-xml=coverage.xml --baseline=.coverage-baseline
- name: Upload coverage artifacts
uses: actions/upload-artifact@v7
with:
name: coverage-reports-py${{ matrix.python-version }}
path: coverage.xml
if-no-files-found: error
- name: Upload pyfwf coverage to Codecov
if: github.event_name == 'push' || github.event_name == 'schedule'
uses: codecov/codecov-action@v6
with:
use_oidc: true
files: coverage.xml
flags: pyfwf,py${{ matrix.python-version }}
fail_ci_if_error: false