update GH for Node20 and v4 actions #17
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: PR test | |
on: | |
pull_request: | |
branches: | |
- '*' | |
jobs: | |
test: | |
runs-on: ubuntu-20.04 | |
timeout-minutes: 90 | |
permissions: | |
pull-requests: write | |
steps: | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
- name: Checkout branch being tested | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
submodules: true | |
clean: false | |
- uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cache/pip | |
key: ${{ runner.os }}-${{ hashFiles('**/requirements*.txt') }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install flake8 pytest pytest-cov | |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
- name: Run test and build coverage file | |
run: | | |
pytest --cache-clear --cov=tdtax > pytest-coverage.txt | |
- name: Upload logs | |
uses: actions/upload-artifact@v4 | |
if: ${{ !env.ACT }} | |
with: | |
name: logs | |
path: pytest-coverage.txt | |