-
Notifications
You must be signed in to change notification settings - Fork 18
37 lines (29 loc) · 794 Bytes
/
main.yml
File metadata and controls
37 lines (29 loc) · 794 Bytes
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: Python CI
on:
push:
branches:
- master
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.9'
- name: Install dependencies
run: |
if pip freeze | grep -v '^\-e' | grep -v '^\-f' | grep -v '^-e' | grep -v '^-f' | cut -d = -f 1 | xargs pip uninstall -y; then true; fi
pip install -r requirements.txt
- name: Lint code
run: |
flake8 .
- name: Run tests
run: |
coverage run --source=./ -m pytest
coverage report
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4