-
Notifications
You must be signed in to change notification settings - Fork 10
62 lines (53 loc) · 1.67 KB
/
test.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
name: Test
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
test:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
with:
submodules: 'true'
- name: Set up Python 3.11
uses: actions/setup-python@v2
with:
python-version: 3.11
- name: Cache pip dependencies
id: cache
uses: actions/cache@v1
env:
cache-name: cache-python-dependencies
with:
path: ~\AppData\Local\pip\Cache
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Install dependencies
shell: bash
run: |
python -m pip install --upgrade pip
pip install wheel
pip install flake8
pip install pytest-cov
pip install -r requirements.txt
pip install -e parsley
find sinks/ sources/ tools/ -name requirements.txt -type f -exec pip install -r {} \;
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
# error codes shown by `--select` can be found
# here (F): https://flake8.pycqa.org/en/latest/user/error-codes.html
# and here (E): https://pycodestyle.pycqa.org/en/latest/intro.html#error-codes
flake8 sources/ sinks/ omnibus/ tools/ --select=E9,F63,F7,F82
- name: Test with pytest
run: |
pytest
- name: Enforce autopep8
shell: bash
run: |
autopep8 -d -r sources/ sinks/ omnibus/ tools/ --exit-code