Skip to content

Commit e3f6a43

Browse files
authored
Merge pull request #235 from cisagov/lineage/skeleton
⚠️ CONFLICT! Lineage pull request for: skeleton
2 parents 2726e42 + 5dde51a commit e3f6a43

File tree

11 files changed

+234
-44
lines changed

11 files changed

+234
-44
lines changed

.github/dependabot.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,16 @@ updates:
1212
schedule:
1313
interval: "weekly"
1414
ignore:
15+
# Managed by cisagov/skeleton-generic
1516
- dependency-name: actions/cache
1617
- dependency-name: actions/checkout
18+
- dependency-name: actions/setup-go
1719
- dependency-name: actions/setup-python
20+
- dependency-name: hashicorp/setup-terraform
21+
- dependency-name: mxschmitt/action-tmate
22+
# Managed by cisagov/skeleton-python-library
23+
- dependency-name: actions/download-artifact
24+
- dependency-name: actions/upload-artifact
1825

1926
- package-ecosystem: "pip"
2027
directory: "/"

.github/labels.yml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
---
2+
# Rather than breaking up descriptions into multiline strings we disable that
3+
# specific rule in yamllint for this file.
4+
# yamllint disable rule:line-length
5+
- color: "eb6420"
6+
description: This issue or pull request is awaiting the outcome of another issue or pull request
7+
name: blocked
8+
- color: "000000"
9+
description: This issue or pull request involves changes to existing functionality
10+
name: breaking change
11+
- color: "d73a4a"
12+
description: This issue or pull request addresses broken functionality
13+
name: bug
14+
- color: "07648d"
15+
description: This issue will be advertised on code.gov's Open Tasks page (https://code.gov/open-tasks)
16+
name: code.gov
17+
- color: "0366d6"
18+
description: Pull requests that update a dependency file
19+
name: dependencies
20+
- color: "5319e7"
21+
description: This issue or pull request improves or adds to documentation
22+
name: documentation
23+
- color: "cfd3d7"
24+
description: This issue or pull request already exists or is covered in another issue or pull request
25+
name: duplicate
26+
- color: "b005bc"
27+
description: A high-level objective issue encompassing multiple issues instead of a specific unit of work
28+
name: epic
29+
- color: "000000"
30+
description: Pull requests that update GitHub Actions code
31+
name: github-actions
32+
- color: "0e8a16"
33+
description: This issue or pull request is well-defined and good for newcomers
34+
name: good first issue
35+
- color: "ff7518"
36+
description: Pull request that should count toward Hacktoberfest participation
37+
name: hacktoberfest-accepted
38+
- color: "a2eeef"
39+
description: This issue or pull request will add or improve functionality, maintainability, or ease of use
40+
name: improvement
41+
- color: "fef2c0"
42+
description: This issue or pull request is not applicable, incorrect, or obsolete
43+
name: invalid
44+
- color: "ce099a"
45+
description: This pull request is ready to merge during the next Lineage Kraken release
46+
name: kraken 🐙
47+
- color: "a4fc5d"
48+
description: This issue or pull request requires further information
49+
name: need info
50+
- color: "fcdb45"
51+
description: This pull request is awaiting an action or decision to move forward
52+
name: on hold
53+
- color: "3772a4"
54+
description: Pull requests that update Python code
55+
name: python
56+
- color: "ef476c"
57+
description: This issue is a request for information or needs discussion
58+
name: question
59+
- color: "00008b"
60+
description: This issue or pull request adds or otherwise modifies test code
61+
name: test
62+
- color: "1d76db"
63+
description: This issue or pull request pulls in upstream updates
64+
name: upstream update
65+
- color: "d4c5f9"
66+
description: This issue or pull request increments the version number
67+
name: version bump
68+
- color: "ffffff"
69+
description: This issue will not be incorporated
70+
name: wontfix

.github/workflows/build.yml

Lines changed: 94 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -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:
@@ -84,7 +80,7 @@ jobs:
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

.github/workflows/sync-labels.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
name: sync-labels
3+
4+
on:
5+
push:
6+
paths:
7+
- '.github/labels.yml'
8+
- '.github/workflows/sync-labels.yml'
9+
10+
permissions:
11+
contents: read
12+
13+
jobs:
14+
labeler:
15+
permissions:
16+
# actions/checkout needs this to fetch code
17+
contents: read
18+
# crazy-max/ghaction-github-labeler needs this to manage repository labels
19+
issues: write
20+
runs-on: ubuntu-latest
21+
steps:
22+
- uses: actions/checkout@v3
23+
- name: Sync repository labels
24+
if: success()
25+
uses: crazy-max/ghaction-github-labeler@v4
26+
with:
27+
# This is a hideous ternary equivalent so we only do a dry run unless
28+
# this workflow is triggered by the develop branch.
29+
dry-run: ${{ github.ref_name == 'develop' && 'false' || 'true' }}

0 commit comments

Comments
 (0)