Skip to content

Merge pull request #56 from yaal-coop/issue-54-matomo #183

Merge pull request #56 from yaal-coop/issue-54-matomo

Merge pull request #56 from yaal-coop/issue-54-matomo #183

Workflow file for this run

name: Check coverage
on:
pull_request:
branches:
- production
- main
push:
branches:
- production
- main
jobs:
compare-coverage:
name: Compare with previous coverage
runs-on: ubuntu-latest
steps:
- name: Setup git
uses: actions/checkout@v3
- name: Get the git branch
uses: actions/checkout@v3
with:
ref: main # TODO: dynamically get the branch against which the PR will be merged?
- name: Setup python
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Install python dependencies
run: |
python -m pip install --upgrade pip
pip install -r web/requirements.app.txt
pip install -r web/requirements.dev.txt
pip install diff-cover
- name: Run unit tests with coverage
run: pytest --cov --cov-report=xml
- name: Check that the edited lines are all covered
run: diff-cover coverage.xml --fail-under=100