-
Notifications
You must be signed in to change notification settings - Fork 5
56 lines (54 loc) · 1.69 KB
/
ci.yml
File metadata and controls
56 lines (54 loc) · 1.69 KB
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
---
name: Continuous Integration
# yamllint disable-line rule:truthy
on: [push, pull_request]
jobs:
linting:
name: Linting
runs-on: ubuntu-latest
steps:
- name: Checking out code from GitHub
uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
pip install -r requirements_test.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
strategy:
matrix:
os: [ubuntu]
python: [3.8, 3.9]
steps:
- name: Checking out code from GitHub
uses: actions/checkout@v2.3.4
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v2.2.1
with:
python-version: ${{ matrix.python }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
pip install -r requirements_test.txt
pip list
- name: Pytest with coverage reporting
run: python -m pytest --cov=python_rako --cov-report=xml tests
- name: Upload coverage to Codecov
if: matrix.python == 3.9 && matrix.os == 'ubuntu'
uses: codecov/codecov-action@v1.5.0
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml
flags: unittests
name: codecov-umbrella