Merge pull request #72 from statisticsnorway/dependabot/pip/pygments-… #193
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
# .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 |