Project general update #268
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Python | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
types: [assigned, opened, reopened, synchronize, ready_for_review] | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.11.9 | |
- name: Cache tests | |
uses: actions/cache@v3 | |
with: | |
path: | | |
Makefile | |
openfisca_aotearoa/tests | |
key: tests-${{ github.sha }} | |
- name: Cache build | |
id: cache-build | |
uses: actions/cache@v3 | |
with: | |
path: dist | |
key: build-${{ github.sha }} | |
- name: Build package | |
if: steps.cache-build.outputs.cache-hit != 'true' | |
run: make install | |
test: | |
runs-on: ubuntu-latest | |
needs: [build] | |
steps: | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.11.9 | |
- name: Restore tests | |
uses: actions/cache@v3 | |
with: | |
path: | | |
Makefile | |
openfisca_aotearoa/tests | |
key: tests-${{ github.sha }} | |
- name: Restore build | |
uses: actions/cache@v3 | |
with: | |
path: dist | |
key: build-${{ github.sha }} | |
- name: Run the test suite | |
run: make test |