Skip to content

Gh main (#27)

Gh main (#27) #15

Workflow file for this run

name: Code test
on:
push:
branches:
- main
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