Skip to content

Merge pull request #357 from Syuparn/issue-356 #571

Merge pull request #357 from Syuparn/issue-356

Merge pull request #357 from Syuparn/issue-356 #571

Workflow file for this run

name: Test Backend Openfisca
on: [push, pull_request]
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.6 # Patch version must be specified to avoid any cache confusion, since the cache key depends on the full Python version. Any potentiel difference in patches between jobs will lead to a cache not found error.
- name: Cache build
id: restore-build
uses: actions/cache@v3
with:
path: ${{ env.pythonLocation }}
key: build-${{ env.pythonLocation }}-${{ hashFiles('setup.py') }}-${{ github.sha }} # Cache the entire build Python environment
restore-keys: |
build-${{ env.pythonLocation }}-${{ hashFiles('setup.py') }}
build-${{ env.pythonLocation }}-
- name: Build package
run: make build
- name: Cache release
id: restore-release
uses: actions/cache@v2
with:
path: dist
key: release-${{ env.pythonLocation }}-${{ hashFiles('setup.py') }}-${{ github.sha }}
# openfisca_japan/tests 配下のテストを実行
test:
runs-on: ubuntu-latest
needs: [build]
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.11.6
- name: Cache build
id: restore-build
uses: actions/cache@v3
with:
path: ${{ env.pythonLocation }}
key: build-${{ env.pythonLocation }}-${{ hashFiles('setup.py') }}-${{ github.sha }}
- name: Lint source codes
run: make check-style
- name: Run backend tests
run: make test