Skip to content

Gh main

Gh main #18

Workflow file for this run

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