-
Notifications
You must be signed in to change notification settings - Fork 1
40 lines (37 loc) · 1.04 KB
/
Copy pathpython_workflow.yml
File metadata and controls
40 lines (37 loc) · 1.04 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
name: build
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.7.11
uses: actions/setup-python@v1
with:
python-version: 3.7.11
- name: Python environment cache set up
uses: actions/cache@v2
with:
path: ${{ env.pythonLocation }}
key: ${{ env.pythonLocation }}-${{ hashFiles('poetry.lock') }}-${{ hashFiles('dev_requirements.txt') }}
- name: Install dependencies
run: |
pip install --upgrade pip
pip install -r dev_requirements.txt
- name: Lint with flake8
run: |
flake8 .
- name: Check formatting with black
run: |
black --check .
- name: Check typehints with mypy
run: |
mypy .
- name: Test with pytest
run: |
pytest --cov=./
- name: Upload codecov
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true