Skip to content

Merge pull request #77 from statisticsnorway/76-validate-should-look-… #203

Merge pull request #77 from statisticsnorway/76-validate-should-look-…

Merge pull request #77 from statisticsnorway/76-validate-should-look-… #203

Workflow file for this run

# .github/workflows/app.yaml
name: PyTest
on: push
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Check out repository code
uses: actions/checkout@v2
# Setup Python (faster than using Python container)
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: "3.10"
- name: cache poetry install
uses: actions/cache@v2
with:
path: ~/.local
key: poetry-1.3.1-0
- uses: snok/install-poetry@v1
with:
version: 1.3.1
virtualenvs-create: true
virtualenvs-in-project: true
- name: cache deps
id: cache-deps
uses: actions/cache@v2
with:
path: .venv
key: pydeps-${{ hashFiles('**/poetry.lock') }}
- run: poetry install --no-interaction --no-root
if: steps.cache-deps.outputs.cache-hit != 'true'
# Dont understand why this is run in addition to the coverage command below...
#- name: Run test suite
# run: |
# poetry add pytest
# poetry run pytest -v -m "not integration_dapla"
- name: Run coverage
run: |
poetry run pytest -v -m "not integration_dapla" --cov statbank/ --cov-fail-under=70