This repository was archived by the owner on Aug 25, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +72
-0
lines changed
dffml/skel/common/.github/workflows Expand file tree Collapse file tree 1 file changed +72
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Tests
2+
3+ on : [push, pull_request]
4+
5+ jobs :
6+ lint :
7+ runs-on : ubuntu-latest
8+ strategy :
9+ fail-fast : false
10+ max-parallel : 40
11+ matrix :
12+ check : [style]
13+ python-version : [3.7]
14+
15+ steps :
16+ - uses : actions/checkout@v2
17+ - name : Set up Python ${{ matrix.python-version }}
18+ uses : actions/setup-python@v1
19+ with :
20+ python-version : ${{ matrix.python-version }}
21+ - name : Get pip cache
22+ id : pip-cache
23+ run : |
24+ python -c "from pip._internal.locations import USER_CACHE_DIR; print('::set-output name=dir::' + USER_CACHE_DIR)"
25+ - name : pip cache
26+ uses : actions/cache@v1
27+ with :
28+ path : ${{ steps.pip-cache.outputs.dir }}
29+ key : ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
30+ restore-keys : |
31+ ${{ runner.os }}-pip-
32+ - name : Install dependencies
33+ run : |
34+ pip install -U black
35+ - name : Run check
36+ run : |
37+ black --check .
38+
39+ test :
40+ runs-on : ubuntu-latest
41+ strategy :
42+ fail-fast : false
43+ max-parallel : 40
44+ matrix :
45+ python-version : [3.7, 3.8]
46+
47+ steps :
48+ - uses : actions/checkout@v2
49+ - name : Set up Python ${{ matrix.python-version }}
50+ uses : actions/setup-python@v1
51+ with :
52+ python-version : ${{ matrix.python-version }}
53+ - name : Get pip cache
54+ id : pip-cache
55+ run : |
56+ python -c "from pip._internal.locations import USER_CACHE_DIR; print('::set-output name=dir::' + USER_CACHE_DIR)"
57+ - name : pip cache
58+ uses : actions/cache@v1
59+ with :
60+ path : ${{ steps.pip-cache.outputs.dir }}
61+ key : ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
62+ restore-keys : |
63+ ${{ runner.os }}-pip-
64+ - name : Install dependencies
65+ run : |
66+ set -x
67+ pip install -U pip
68+ pip install -U .
69+ - name : Test
70+ run : |
71+ set -x
72+ python setup.py test
You can’t perform that action at this time.
0 commit comments