Skip to content
Open
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
21 changes: 17 additions & 4 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@ name: Pull Request CI

on:
pull_request:
push:
branches: [main]

permissions:
contents: read
checks: write
pull-requests: write

concurrency:
group: pr-${{ github.ref }}
Expand All @@ -10,6 +17,7 @@ concurrency:
jobs:
unit:
name: Unit
if: github.event_name == 'pull_request'
runs-on: ${{ matrix.os }}
timeout-minutes: 25
strategy:
Expand Down Expand Up @@ -37,6 +45,7 @@ jobs:

discover-systems:
name: Discover regression systems
if: github.event_name == 'pull_request'
runs-on: ubuntu-24.04
outputs:
systems: ${{ steps.set-systems.outputs.systems }}
Expand All @@ -63,7 +72,8 @@ jobs:

regression-quick:
name: Regression (fast) • ${{ matrix.system }}
needs: [unit, discover-systems]
if: github.event_name == 'pull_request'
needs: discover-systems
runs-on: ubuntu-24.04
timeout-minutes: 35

Expand All @@ -86,7 +96,7 @@ jobs:
python -m pip install --upgrade pip
python -m pip install -e .[testing]

- name: Run fast regression tests (per system)
- name: Run fast regression tests
run: |
python -m pytest tests/regression \
-m "not slow" \
Expand All @@ -96,7 +106,7 @@ jobs:
-vv \
--durations=20

- name: Upload artifacts (failure)
- name: Upload artifacts on failure
if: failure()
uses: actions/upload-artifact@v4
with:
Expand All @@ -107,6 +117,7 @@ jobs:

docs:
name: Docs
if: github.event_name == 'pull_request'
needs: unit
runs-on: ubuntu-24.04
timeout-minutes: 25
Expand Down Expand Up @@ -139,6 +150,8 @@ jobs:

pre-commit:
name: Pre-commit
if: github.event_name == 'pull_request'
needs: unit
runs-on: ubuntu-24.04
timeout-minutes: 15

Expand Down Expand Up @@ -187,7 +200,7 @@ jobs:

- name: Run coverage
run: |
pytest tests/unit \
python -m pytest tests/unit \
--cov CodeEntropy \
--cov-report term-missing \
--cov-report xml \
Expand Down