-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (33 loc) · 1.03 KB
/
coverage.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# Runs all tests and pushes coverage report to codeclimate
name: Coverage
defaults:
run:
shell: bash
on: # Runs on all push events to master branch and any push related to a pull request
push:
branches:
- master
pull_request: # so that codeclimate gets coverage and reports on the diff
jobs:
coverage:
runs-on: ubuntu-latest
env:
python-version: 3.12
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ env.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ env.python-version }}
cache: 'pip'
cache-dependency-path: '**/pyproject.toml'
- name: Upgrade pip
run: python -m pip install --upgrade pip
- name: Install package with test dependencies
run: python -m pip install ".[test]"
- name: Run all tests
run: python -m pytest
- name: Upload Coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}