File tree 1 file changed +21
-12
lines changed
1 file changed +21
-12
lines changed Original file line number Diff line number Diff line change 1
1
# Run pytest with GitHub Actions
2
2
name : pytest
3
3
4
- on : [push]
5
-
6
- defaults :
7
- run :
8
- working-directory : ./tests
4
+ on :
5
+ push :
6
+ branches :
7
+ - master
8
+ - main
9
+ pull_request :
10
+ branches :
11
+ - master
12
+ - main
9
13
10
14
jobs :
11
- test :
15
+ build :
12
16
runs-on : ubuntu-latest
13
17
14
- steps :
15
- - uses : actions/checkout@v2
16
18
17
- - name : Set up Python 3.6
18
- uses : actions/setup-python@v2
19
+ steps :
20
+ - uses : actions/checkout@v3
21
+ - name : Set up Python
22
+ uses : actions/setup-python@v4
19
23
with :
20
- python-version : 3.6
24
+ python-version : ' 3.8 '
21
25
22
26
- name : Install dependencies
23
27
run : |
24
28
python -m pip install --upgrade pip
25
- pip install -r requirements.txt
29
+ pip install pytest
30
+ if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
31
+
32
+ - name : Install package
33
+ run : |
34
+ pip install .
26
35
27
36
- name : Run pytest
28
37
run : |
You can’t perform that action at this time.
0 commit comments