-
Notifications
You must be signed in to change notification settings - Fork 2
37 lines (28 loc) · 1007 Bytes
/
tests.yaml
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
name: Tests
on: [push, pull_request] # skip workflow with [skip ci]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.8
uses: actions/setup-python@v4
with:
python-version: '3.8'
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: Install requirements
run: |
python -m pip install --upgrade pip
pip install -r requirements_dev.txt
- name: Test with pytest
if: ${{ !contains(github.event.head_commit.message, '[skip tests]') }}
run: |
pytest --cov=./ --cov-report=xml
- name: Upload coverage report to codecov
if: ${{ !contains(github.event.head_commit.message, '[skip coverage report]') }}
uses: codecov/codecov-action@v3
- name: Lint with flake8
if: ${{ !contains(github.event.head_commit.message, '[skip linting]') }}
run: |
flake8 src