Skip to content

Commit ca5ffd4

Browse files
authored
Merge pull request #18 from cisagov/lineage/skeleton
⚠️ CONFLICT! Lineage pull request for: skeleton
2 parents 7601e00 + 3b10e83 commit ca5ffd4

File tree

11 files changed

+235
-42
lines changed

11 files changed

+235
-42
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: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
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: "d73a4a"
60+
description: This issue or pull request addresses a security issue
61+
name: security
62+
- color: "00008b"
63+
description: This issue or pull request adds or otherwise modifies test code
64+
name: test
65+
- color: "1d76db"
66+
description: This issue or pull request pulls in upstream updates
67+
name: upstream update
68+
- color: "d4c5f9"
69+
description: This issue or pull request increments the version number
70+
name: version bump
71+
- color: "ffffff"
72+
description: This issue will not be incorporated
73+
name: wontfix

.github/workflows/build.yml

Lines changed: 88 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -21,28 +21,24 @@ 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
python-version: "3.10"
2727
# We need the Go version and Go cache location for the actions/cache step,
2828
# so the Go installation must happen before that.
29-
- uses: actions/setup-go@v2
29+
- id: setup-go
30+
uses: actions/setup-go@v3
3031
with:
31-
go-version: "1.16"
32-
- name: Store installed Go version
33-
id: go-version
34-
run: |
35-
echo "::set-output name=version::"\
36-
"$(go version | sed 's/^go version go\([0-9.]\+\) .*/\1/')"
32+
go-version: "1.19"
3733
- name: Lookup Go cache directory
3834
id: go-cache
3935
run: |
40-
echo "::set-output name=dir::$(go env GOCACHE)"
36+
echo "dir=$(go env GOCACHE)" >> $GITHUB_OUTPUT
4137
- uses: actions/cache@v3
4238
env:
4339
BASE_CACHE_KEY: "${{ github.job }}-${{ runner.os }}-\
4440
py${{ steps.setup-python.outputs.python-version }}-\
45-
go${{ steps.go-version.outputs.version }}-\
41+
go${{ steps.setup-go.outputs.go-version }}-\
4642
packer${{ steps.setup-env.outputs.packer-version }}-\
4743
tf${{ steps.setup-env.outputs.terraform-version }}-"
4844
with:
@@ -82,7 +78,7 @@ jobs:
8278
${{ env.CURL_CACHE_DIR }}/"${PACKER_ZIP}"
8379
sudo mv /usr/local/bin/packer /usr/local/bin/packer-default
8480
sudo ln -s /opt/packer/packer /usr/local/bin/packer
85-
- uses: hashicorp/setup-terraform@v1
81+
- uses: hashicorp/setup-terraform@v2
8682
with:
8783
terraform_version: ${{ steps.setup-env.outputs.terraform-version }}
8884
- name: Install shfmt
@@ -107,20 +103,26 @@ jobs:
107103
uses: mxschmitt/action-tmate@v3
108104
if: env.RUN_TMATE
109105
test:
110-
runs-on: ubuntu-latest
106+
name: test source - py${{ matrix.python-version }}
107+
runs-on: ${{ matrix.os }}
111108
strategy:
112109
fail-fast: false
113110
matrix:
111+
os:
112+
- ubuntu-latest
114113
python-version:
115114
- "3.7"
116115
- "3.8"
117116
- "3.9"
118117
- "3.10"
119118
- "3.11"
119+
include:
120+
- os: ubuntu-20.04
121+
python-version: "3.6"
120122
steps:
121123
- uses: actions/checkout@v3
122124
- id: setup-python
123-
uses: actions/setup-python@v3
125+
uses: actions/setup-python@v4
124126
with:
125127
python-version: ${{ matrix.python-version }}
126128
- uses: actions/cache@v3
@@ -159,11 +161,12 @@ jobs:
159161
if: env.RUN_TMATE
160162
coveralls-finish:
161163
runs-on: ubuntu-latest
162-
needs: test
164+
needs:
165+
- test
163166
steps:
164167
- uses: actions/checkout@v3
165168
- id: setup-python
166-
uses: actions/setup-python@v3
169+
uses: actions/setup-python@v4
167170
with:
168171
python-version: "3.10"
169172
- uses: actions/cache@v3
@@ -193,21 +196,29 @@ jobs:
193196
uses: mxschmitt/action-tmate@v3
194197
if: env.RUN_TMATE
195198
build:
196-
runs-on: ubuntu-latest
197-
needs: [lint, test]
199+
name: build wheel - py${{ matrix.python-version }}
200+
needs:
201+
- lint
202+
- test
203+
runs-on: ${{ matrix.os }}
198204
strategy:
199205
fail-fast: false
200206
matrix:
207+
os:
208+
- ubuntu-latest
201209
python-version:
202210
- "3.7"
203211
- "3.8"
204212
- "3.9"
205213
- "3.10"
206214
- "3.11"
215+
include:
216+
- os: ubuntu-20.04
217+
python-version: "3.6"
207218
steps:
208219
- uses: actions/checkout@v3
209220
- id: setup-python
210-
uses: actions/setup-python@v3
221+
uses: actions/setup-python@v4
211222
with:
212223
python-version: ${{ matrix.python-version }}
213224
- uses: actions/cache@v3
@@ -231,10 +242,68 @@ jobs:
231242
- name: Build artifacts
232243
run: python -m build
233244
- name: Upload artifacts
234-
uses: actions/upload-artifact@v2
245+
uses: actions/upload-artifact@v3
235246
with:
236247
name: dist-${{ matrix.python-version }}
237248
path: dist
238249
- name: Setup tmate debug session
239250
uses: mxschmitt/action-tmate@v3
240251
if: env.RUN_TMATE
252+
test-build:
253+
name: test built wheel - py${{ matrix.python-version }}
254+
needs:
255+
- build
256+
runs-on: ${{ matrix.os }}
257+
strategy:
258+
fail-fast: false
259+
matrix:
260+
os:
261+
- ubuntu-latest
262+
python-version:
263+
- "3.7"
264+
- "3.8"
265+
- "3.9"
266+
- "3.10"
267+
- "3.11"
268+
include:
269+
- os: ubuntu-20.04
270+
python-version: "3.6"
271+
steps:
272+
- uses: actions/checkout@v3
273+
- id: setup-python
274+
uses: actions/setup-python@v4
275+
with:
276+
python-version: ${{ matrix.python-version }}
277+
- uses: actions/cache@v3
278+
env:
279+
BASE_CACHE_KEY: "${{ github.job }}-${{ runner.os }}-\
280+
py${{ steps.setup-python.outputs.python-version }}-"
281+
with:
282+
path: ${{ env.PIP_CACHE_DIR }}
283+
# We do not use '**/setup.py' in the cache key so only the 'setup.py'
284+
# file in the root of the repository is used. This is in case a Python
285+
# package were to have a 'setup.py' as part of its internal codebase.
286+
key: "${{ env.BASE_CACHE_KEY }}\
287+
${{ hashFiles('**/requirements.txt') }}-\
288+
${{ hashFiles('setup.py') }}"
289+
restore-keys: |
290+
${{ env.BASE_CACHE_KEY }}
291+
- name: Retrieve the built wheel
292+
uses: actions/download-artifact@v3
293+
with:
294+
name: dist-${{ matrix.python-version }}
295+
path: dist
296+
- id: find-wheel
297+
name: Get the name of the retrieved wheel (there should only be one)
298+
run: echo "wheel=$(ls dist/*whl)" >> $GITHUB_OUTPUT
299+
- name: Update core Python packages
300+
run: python -m pip install --upgrade pip setuptools wheel
301+
- name: Install the built wheel (along with testing dependencies)
302+
run: python -m pip install ${{ steps.find-wheel.outputs.wheel }}[test]
303+
- name: Run tests
304+
env:
305+
RELEASE_TAG: ${{ github.event.release.tag_name }}
306+
run: pytest
307+
- name: Setup tmate debug session
308+
uses: mxschmitt/action-tmate@v3
309+
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)