@@ -21,30 +21,26 @@ jobs:
2121 uses : cisagov/setup-env-github-action@develop
2222 - uses : actions/checkout@v3
2323 - id : setup-python
24- uses : actions/setup-python@v3
24+ uses : actions/setup-python@v4
2525 with :
2626 # A lower version is used because of a dependency issue in Python
27- # versions 3.8-3.10
27+ # versions 3.8-3.11
2828 python-version : " 3.7"
2929 # We need the Go version and Go cache location for the actions/cache step,
3030 # so the Go installation must happen before that.
31- - uses : actions/setup-go@v2
31+ - id : setup-go
32+ uses : actions/setup-go@v3
3233 with :
33- go-version : " 1.16"
34- - name : Store installed Go version
35- id : go-version
36- run : |
37- echo "::set-output name=version::"\
38- "$(go version | sed 's/^go version go\([0-9.]\+\) .*/\1/')"
34+ go-version : " 1.19"
3935 - name : Lookup Go cache directory
4036 id : go-cache
4137 run : |
42- echo "::set-output name= dir:: $(go env GOCACHE)"
38+ echo "dir= $(go env GOCACHE)" >> $GITHUB_OUTPUT
4339 - uses : actions/cache@v3
4440 env :
4541 BASE_CACHE_KEY : " ${{ github.job }}-${{ runner.os }}-\
4642 py${{ steps.setup-python.outputs.python-version }}-\
47- go${{ steps.go-version .outputs.version }}-\
43+ go${{ steps.setup-go .outputs.go- version }}-\
4844 packer${{ steps.setup-env.outputs.packer-version }}-\
4945 tf${{ steps.setup-env.outputs.terraform-version }}-"
5046 with :
8480 ${{ env.CURL_CACHE_DIR }}/"${PACKER_ZIP}"
8581 sudo mv /usr/local/bin/packer /usr/local/bin/packer-default
8682 sudo ln -s /opt/packer/packer /usr/local/bin/packer
87- - uses : hashicorp/setup-terraform@v1
83+ - uses : hashicorp/setup-terraform@v2
8884 with :
8985 terraform_version : ${{ steps.setup-env.outputs.terraform-version }}
9086 - name : Install shfmt
@@ -109,10 +105,12 @@ jobs:
109105 uses : mxschmitt/action-tmate@v3
110106 if : env.RUN_TMATE
111107 test :
112- runs-on : ubuntu-latest
108+ runs-on : ${{ matrix.os }}
113109 strategy :
114110 fail-fast : false
115111 matrix :
112+ os :
113+ - ubuntu-latest
116114 # The versions of nassl pinned by our sslyze version constraint only
117115 # have bdists available for Python 3.6 and 3.7, so we can only support
118116 # those versions of Python. The error seen when trying to install on
@@ -123,15 +121,18 @@ jobs:
123121 # sslyze 2.1.4 depends on nassl<2.3.0 and >=2.2.0
124122 # sslyze 2.1.3 depends on nassl<2.3.0 and >=2.2.0
125123 python-version :
126- - " 3.6"
127124 - " 3.7"
128125 # - "3.8"
129126 # - "3.9"
130127 # - "3.10"
128+ # - "3.11"
129+ include :
130+ - os : ubuntu-20.04
131+ python-version : " 3.6"
131132 steps :
132133 - uses : actions/checkout@v3
133134 - id : setup-python
134- uses : actions/setup-python@v3
135+ uses : actions/setup-python@v4
135136 with :
136137 python-version : ${{ matrix.python-version }}
137138 - uses : actions/cache@v3
@@ -170,14 +171,15 @@ jobs:
170171 if : env.RUN_TMATE
171172 coveralls-finish :
172173 runs-on : ubuntu-latest
173- needs : test
174+ needs :
175+ - test
174176 steps :
175177 - uses : actions/checkout@v3
176178 - id : setup-python
177- uses : actions/setup-python@v3
179+ uses : actions/setup-python@v4
178180 with :
179181 # A lower version is used because of a dependency issue in Python
180- # versions 3.8-3.10
182+ # versions 3.8-3.11
181183 python-version : " 3.7"
182184 - uses : actions/cache@v3
183185 env :
@@ -206,13 +208,16 @@ jobs:
206208 uses : mxschmitt/action-tmate@v3
207209 if : env.RUN_TMATE
208210 build :
209- runs-on : ubuntu-latest
210- needs : [lint, test]
211+ runs-on : ${{ matrix.os }}
212+ needs :
213+ - lint
214+ - test
211215 strategy :
212216 fail-fast : false
213217 matrix :
218+ os :
219+ - ubuntu-latest
214220 python-version :
215- - " 3.6"
216221 - " 3.7"
217222 # Disabled due to an unresolvable dependency issue between sslyze and
218223 # nassl:
@@ -224,10 +229,14 @@ jobs:
224229 # - "3.8"
225230 # - "3.9"
226231 # - "3.10"
232+ # - "3.11"
233+ include :
234+ - os : ubuntu-20.04
235+ python-version : " 3.6"
227236 steps :
228237 - uses : actions/checkout@v3
229238 - id : setup-python
230- uses : actions/setup-python@v3
239+ uses : actions/setup-python@v4
231240 with :
232241 python-version : ${{ matrix.python-version }}
233242 - uses : actions/cache@v3
@@ -251,10 +260,72 @@ jobs:
251260 - name : Build artifacts
252261 run : python -m build
253262 - name : Upload artifacts
254- uses : actions/upload-artifact@v2
263+ uses : actions/upload-artifact@v3
255264 with :
256265 name : dist-${{ matrix.python-version }}
257266 path : dist
258267 - name : Setup tmate debug session
259268 uses : mxschmitt/action-tmate@v3
260269 if : env.RUN_TMATE
270+ test-build :
271+ runs-on : ${{ matrix.os }}
272+ needs :
273+ - build
274+ strategy :
275+ fail-fast : false
276+ matrix :
277+ os :
278+ - ubuntu-latest
279+ python-version :
280+ - " 3.7"
281+ # Disabled due to an unresolvable dependency issue between sslyze and
282+ # nassl:
283+ # ERROR: Cannot install pshtt because these package versions have
284+ # conflicting dependencies.
285+ # The conflict is caused by:
286+ # sslyze 2.1.4 depends on nassl<2.3.0 and >=2.2.0
287+ # sslyze 2.1.3 depends on nassl<2.3.0 and >=2.2.0
288+ # - "3.8"
289+ # - "3.9"
290+ # - "3.10"
291+ # - "3.11"
292+ include :
293+ - os : ubuntu-20.04
294+ python-version : " 3.6"
295+ steps :
296+ - uses : actions/checkout@v3
297+ - id : setup-python
298+ uses : actions/setup-python@v4
299+ with :
300+ python-version : ${{ matrix.python-version }}
301+ - uses : actions/cache@v3
302+ env :
303+ BASE_CACHE_KEY : " ${{ github.job }}-${{ runner.os }}-\
304+ py${{ steps.setup-python.outputs.python-version }}-"
305+ with :
306+ path : ${{ env.PIP_CACHE_DIR }}
307+ # We do not use '**/setup.py' in the cache key so only the 'setup.py'
308+ # file in the root of the repository is used. This is in case a Python
309+ # package were to have a 'setup.py' as part of its internal codebase.
310+ key : " ${{ env.BASE_CACHE_KEY }}\
311+ ${{ hashFiles('**/requirements.txt') }}-\
312+ ${{ hashFiles('setup.py') }}"
313+ restore-keys : |
314+ ${{ env.BASE_CACHE_KEY }}
315+ - name : Retrieve the built wheel
316+ uses : actions/download-artifact@v3
317+ with :
318+ name : dist-${{ matrix.python-version }}
319+ - name : Install testing dependencies
320+ run : |
321+ python -m pip install --upgrade pip setuptools wheel
322+ python -m pip install --upgrade pytest pytest-cov
323+ - name : Install the built wheel (there should only be one)
324+ run : python -m pip install *.whl
325+ - name : Run tests
326+ env :
327+ RELEASE_TAG : ${{ github.event.release.tag_name }}
328+ run : pytest
329+ - name : Setup tmate debug session
330+ uses : mxschmitt/action-tmate@v3
331+ if : env.RUN_TMATE
0 commit comments