55branches :
66 -master
77pull_request :
8- types :[opened, synchronize]
8+ types :
9+ -opened
10+ -synchronize
911
1012jobs :
13+ lint :
14+ runs-on :ubuntu-latest
15+ steps :
16+ -uses :actions/checkout@v3
17+ -name :Set up Python
18+ uses :actions/setup-python@v4
19+ with :
20+ python-version :" 3.11"
21+ # Issue ref: https://github.com/actions/setup-python/issues/436
22+ # cache: "pip"
23+ # cache-dependency-path: pyproject.toml
24+ -uses :actions/cache@v3
25+ id :cache
26+ with :
27+ path :${{ env.pythonLocation }}
28+ key :${{ runner.os }}-python-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml', 'requirements-tests.txt') }}-test-v03
29+ -name :Install Dependencies
30+ if :steps.cache.outputs.cache-hit != 'true'
31+ run :pip install -r requirements-tests.txt
32+ -name :Lint
33+ run :bash scripts/lint.sh
34+
1135test :
1236runs-on :ubuntu-latest
1337strategy :
1438matrix :
1539python-version :["3.7", "3.8", "3.9", "3.10", "3.11"]
1640fail-fast :false
17-
1841steps :
1942 -uses :actions/checkout@v3
2043 -name :Set up Python
2144uses :actions/setup-python@v4
2245with :
2346python-version :${{ matrix.python-version }}
24- cache :" pip"
25- cache-dependency-path :pyproject.toml
47+ # Issue ref: https://github.com/actions/setup-python/issues/436
48+ # cache: "pip"
49+ # cache-dependency-path: pyproject.toml
2650 -uses :actions/cache@v3
2751id :cache
2852with :
2953path :${{ env.pythonLocation }}
30- key :${{ runner.os }}-python-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml') }}-test-v03
54+ key :${{ runner.os }}-python-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml', 'requirements-tests.txt' ) }}-test-v03
3155 -name :Install Dependencies
3256if :steps.cache.outputs.cache-hit != 'true'
33- run :pip install -e .[all,dev,doc,test]
34- -name :Lint
35- run :bash scripts/lint.sh
57+ run :pip install -r requirements-tests.txt
3658 -run :mkdir coverage
3759 -name :Test
3860run :bash scripts/test.sh
@@ -44,32 +66,28 @@ jobs:
4466with :
4567name :coverage
4668path :coverage
69+
4770coverage-combine :
4871needs :[test]
4972runs-on :ubuntu-latest
50-
5173steps :
5274 -uses :actions/checkout@v3
53-
5475 -uses :actions/setup-python@v4
5576with :
5677python-version :' 3.8'
57- cache : " pip "
58- cache-dependency-path : pyproject.toml
59-
78+ # Issue ref: https://github.com/actions/setup-python/issues/436
79+ # cache: "pip"
80+ # cache-dependency-path: pyproject.toml
6081 -name :Get coverage files
6182uses :actions/download-artifact@v3
6283with :
6384name :coverage
6485path :coverage
65-
6686 -run :pip install coverage[toml]
67-
6887 -run :ls -la coverage
6988 -run :coverage combine coverage
7089 -run :coverage report
7190 -run :coverage html --show-contexts --title "Coverage for ${{ github.sha }}"
72-
7391 -name :Store coverage HTML
7492uses :actions/upload-artifact@v3
7593with :
@@ -78,14 +96,10 @@ jobs:
7896
7997# https://github.com/marketplace/actions/alls-green#why
8098check :# This job does nothing and is only used for the branch protection
81-
8299if :always()
83-
84100needs :
85101 -coverage-combine
86-
87102runs-on :ubuntu-latest
88-
89103steps :
90104 -name :Decide whether the needed jobs succeeded or failed
91105uses :re-actors/alls-green@release/v1