name: CI on: push: pull_request: # Dispatched by Release & Publish after a release commit workflow_dispatch: jobs: parity-audit: name: EwE parity audit runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 - name: Set up Python uses: actions/setup-python@v4 with: python-version: "3.12" - name: Install pypath package run: pip install -e packages/pypath - name: Run parity audit run: python packages/pypath/scripts/ewe_parity_audit.py - name: Upload parity report uses: actions/upload-artifact@v4 with: name: ewe-parity-report path: docs/parity/ewe_parity_report.json build: name: Lint / Typecheck / Test (${{ matrix.os }} / ${{ matrix.python-version }}) runs-on: ${{ matrix.os }} strategy: matrix: os: [ubuntu-latest, windows-latest] python-version: ["3.11", "3.12"] steps: - name: Checkout uses: actions/checkout@v4 - name: Set up Python uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - name: Get pip cache dir id: pip-cache shell: bash run: echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT - name: Cache pip uses: actions/cache@v4 with: path: ${{ steps.pip-cache.outputs.dir }} key: pip-${{ matrix.os }}-py${{ matrix.python-version }}-${{ hashFiles('**/pyproject.toml') }} restore-keys: | pip-${{ matrix.os }}-py${{ matrix.python-version }}- - name: Upgrade pip and install dev deps run: | python -m pip install --upgrade pip pip install -e 'packages/pypath[dev]' - name: Ruff Lint run: ruff check packages/ - name: Ruff Format check run: ruff format --check packages/ - name: Type check (mypy) run: mypy packages/pypath/src --config-file packages/pypath/pyproject.toml || true - name: Run tests (unit) run: | pytest packages/pypath/tests -q -m "not integration and not slow" --ignore=packages/pypath/tests/integration --maxfail=1 --disable-warnings - name: Upload test results (artifact) if: failure() uses: actions/upload-artifact@v4 with: name: pytest-report-${{ matrix.os }}-${{ matrix.python-version }} path: | **/pytest-report.* **/test-results/