9
9
test :
10
10
runs-on : macos-latest
11
11
env :
12
- DEV_URL : ${{ vars .DEV_URL }}
13
- STAG_URL : ${{ vars .STAG_URL }}
12
+ DEV_URL : ${{ secrets .DEV_URL }}
13
+ STAG_URL : ${{ secrets .STAG_URL }}
14
14
15
15
permissions :
16
16
checks : write
@@ -19,34 +19,39 @@ jobs:
19
19
- name : Checkout repository
20
20
uses : actions/checkout@v3
21
21
22
- - name : setup Python
23
- uses : actions/setup-python@v3
22
+ - name : Setup Python
23
+ uses : actions/setup-python@v2
24
24
with :
25
25
python-version : " 3.10"
26
26
27
-
28
27
- name : Install Chrome and WebDriver
29
28
run : |
30
29
brew install --cask google-chrome
31
30
32
- - name : Install dependencies
31
+ - name : Cache dependencies
32
+ uses : actions/cache@v2
33
33
with :
34
- cache : pip
35
- cache-dependency-path : ' **/requirements.txt'
34
+ path : ~/.cache/pip
35
+ key : ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
36
+ restore-keys : |
37
+ ${{ runner.os }}-pip-
38
+
39
+ - name : Install dependencies
36
40
run : |
37
41
python -m pip install --upgrade pip
38
42
pip install -r requirements.txt
39
43
pip install --upgrade pytest pytest-html
40
-
44
+ working-directory : ${{ github.workspace }}
41
45
42
46
- name : Run tests
43
47
run : |
44
48
python -m pytest --verbose --junit-xml=test-results.xml
45
-
49
+ working-directory : ${{ github.workspace }}
50
+
46
51
- name : Publish Test Report
47
52
uses : mikepenz/action-junit-report@v3
48
53
if : success() || failure() # always run even if the previous step fails
49
54
with :
50
55
report_paths : ' **/test-results.xml'
51
56
detailed_summary : true
52
- include_passed : true
57
+ include_passed : true
0 commit comments