@@ -38,23 +38,23 @@ jobs:
38
38
with :
39
39
path : ~/.cache/pip
40
40
# Cache based on OS, Python version, and dependency hash
41
- key : test-${{ runner.os }}-python${{ matrix.python-version }}-${{ hashFiles('requirements-test.txt') }}
41
+ key : pip- test-${{ runner.os }}-python${{ matrix.python-version }}-${{ hashFiles('requirements-test.txt') }}
42
42
43
43
- name : Cache dependencies (macOS)
44
44
if : startsWith(runner.os, 'macOS')
45
45
uses : actions/cache@v2
46
46
with :
47
47
path : ~/Library/Caches/pip
48
48
# Cache based on OS, Python version, and dependency hash
49
- key : test-${{ runner.os }}-python${{ matrix.python-version }}-${{ hashFiles('requirements-test.txt') }}
49
+ key : pip- test-${{ runner.os }}-python${{ matrix.python-version }}-${{ hashFiles('requirements-test.txt') }}
50
50
51
51
- name : Cache dependencies (Windows)
52
52
if : startsWith(runner.os, 'Windows')
53
53
uses : actions/cache@v2
54
54
with :
55
55
path : ~\AppData\Local\pip\Cache
56
56
# Cache based on OS, Python version, and dependency hash
57
- key : pip-${{ runner.os }}-python${{ matrix.python-version }}-${{ hashFiles('requirements-test.txt') }}
57
+ key : pip-test- ${{ runner.os }}-python${{ matrix.python-version }}-${{ hashFiles('requirements-test.txt') }}
58
58
59
59
- name : Install dependencies
60
60
run : |
@@ -67,15 +67,46 @@ jobs:
67
67
shell : bash
68
68
env :
69
69
TMPDIR : " ${{ matrix.os == 'windows-latest' && 'D:\\ a\\ _temp' || '' }}"
70
+
71
+ coverage :
72
+ name : coverage
73
+ runs-on : ubuntu-latest
74
+ steps :
75
+ - uses : actions/checkout@v2
76
+
77
+ - name : Set up Python 3.8
78
+ uses : actions/setup-python@v2
79
+ with :
80
+ python-version : " 3.8"
81
+
82
+ - name : Cache dependencies
83
+ uses : actions/cache@v2
84
+ with :
85
+ path : ~/.cache/pip
86
+ # Cache based on OS, Python version, and dependency hash
87
+ key : pip-test-${{ runner.os }}-python3.8-${{ hashFiles('requirements-test.txt') }}
88
+
89
+ - name : Install dependencies
90
+ run : |
91
+ pip install --upgrade pip
92
+ pip install -r requirements-test.txt
93
+ pip install -e ".[validation]"
94
+
95
+ - name : Execute test suite
96
+ # --fail-under=0 ensures we publish the coverage regardless of whether it meets
97
+ # the minimum so we can use Codecov to evaluate gaps
98
+ run : |
99
+ coverage run --source=pystac/ -m unittest discover tests/
100
+ coverage xml --fail-under=0
70
101
71
102
- name : Upload All coverage to Codecov
72
103
uses : codecov/codecov-action@v1
73
- # Only upload this once...
74
- if : ${{ matrix.os == 'ubuntu-latest' && matrix.python-version == '3.8'}}
104
+ if : ${{ env.GITHUB_REPOSITORY }} == 'stac-utils/pystac'
75
105
with :
76
106
token : ${{ secrets.CODECOV_TOKEN }}
77
107
file : ./coverage.xml
78
108
fail_ci_if_error : false
109
+
79
110
lint :
80
111
runs-on : ubuntu-latest
81
112
strategy :
0 commit comments