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
54 changes: 54 additions & 0 deletions .github/workflows/coveralls-main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Coveralls Main

on:
push:
branches: [main]

workflow_dispatch:

permissions:
contents: read

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

jobs:
coveralls:
name: Build main coverage baseline
runs-on: ubuntu-24.04
timeout-minutes: 30

permissions:
contents: read
checks: write
statuses: write

steps:
- name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8

- name: Set up Python 3.14
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405
with:
python-version: "3.14"

- name: Install testing dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -e .[testing]

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

- name: Upload coverage to Coveralls
uses: coverallsapp/github-action@5cbfd81b66ca5d10c19b062c04de0199c215fb6e
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
file: coverage.xml
fail-on-error: false
23 changes: 10 additions & 13 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,17 @@ name: Pull Request CI

on:
pull_request:
push:
branches: [main]

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

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

jobs:
unit:
name: Unit
if: github.event_name == 'pull_request'
runs-on: ${{ matrix.os }}
timeout-minutes: 25
strategy:
Expand All @@ -40,12 +35,11 @@ jobs:
python -m pip install --upgrade pip
python -m pip install -e .[testing]

- name: Pytest (unit) • ${{ matrix.os }}, ${{ matrix.python-version }}
- name: Pytest unit • ${{ matrix.os }}, ${{ matrix.python-version }}
run: python -m pytest tests/unit

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 @@ -68,11 +62,10 @@ jobs:
id: set-systems
run: |
SYSTEMS=$(python -m tests.regression.list_systems)
echo "systems=$SYSTEMS" >> $GITHUB_OUTPUT
echo "systems=$SYSTEMS" >> "$GITHUB_OUTPUT"

regression-quick:
name: Regression (fast) • ${{ matrix.system }}
if: github.event_name == 'pull_request'
name: Regression fast • ${{ matrix.system }}
needs: discover-systems
runs-on: ubuntu-24.04
timeout-minutes: 35
Expand Down Expand Up @@ -117,7 +110,6 @@ jobs:

docs:
name: Docs
if: github.event_name == 'pull_request'
needs: unit
runs-on: ubuntu-24.04
timeout-minutes: 25
Expand Down Expand Up @@ -150,7 +142,6 @@ 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 @@ -184,6 +175,12 @@ jobs:
runs-on: ubuntu-24.04
timeout-minutes: 30

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

steps:
- name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8
Expand Down