Skip to content
Closed
32 changes: 28 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,32 @@
name: Test
on:
pull_request:
paths-ignore: "*.rst"
push:
# paths-ignore: "*.rst"
branches: [master, develop]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
pre-commit:
check-paths:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: pipx run pre-commit run --all-files
with:
fetch-depth: 0
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36
id: changes
with:
filters: |
nondoc:
- '!**/*.rst'
- run: echo 'changed=${{ steps.changes.outputs.nondoc }}' >> "$GITHUB_OUTPUT"
id: changed
outputs:
changed: ${{ steps.changed.outputs.changed }}

build-test:
needs: check-paths
if: needs.check-paths.outputs.changed == 'true'
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
Expand All @@ -41,3 +52,16 @@ jobs:
python -m pip install --editable .[dev]
- name: Test with tox
run: tox -e py

pass:
needs: build-test
if: always()
runs-on: ubuntu-latest
steps:
- name: fail if build-test ran and failed
if: ${{ needs.build-test.result == 'failure' }}
run: exit 1
- name: Curiosity
run: |
echo "$GITHUB_OUTPUT"
cat "$GITHUB_OUTPUT"