This repository has been archived by the owner on Jun 26, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
64 lines (62 loc) · 1.81 KB
/
ci.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
---
name: Continuous Integration
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
linting:
name: Linting
runs-on: ubuntu-latest
steps:
- name: Checking out code from GitHub
uses: actions/[email protected]
- name: Set up Python 3.7
uses: actions/[email protected]
with:
python-version: 3.7
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
pip install -r requirements_test.txt
pip install -r requirements.txt
pip install pre-commit
pip list
pre-commit --version
- name: Run pre-commit on all files
run: |
pre-commit run --all-files --show-diff-on-failure
test:
name: Python ${{ matrix.python }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}-latest
needs: [linting]
strategy:
matrix:
os: [ubuntu]
python: [3.7, 3.8]
steps:
- name: Checking out code from GitHub
uses: actions/[email protected]
- name: Set up Python ${{ matrix.python }}
uses: actions/[email protected]
with:
python-version: ${{ matrix.python }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
pip install -r requirements_test.txt
pip install -r requirements.txt
pip list
- name: Pytest with coverage reporting
run: pytest --cov=sonarr --cov-report=xml
- name: Upload coverage to Codecov
if: matrix.python == 3.8 && matrix.os == 'ubuntu'
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml
flags: unittests
name: codecov-umbrella