Skip to content

Commit

Permalink
Merge pull request #51 from cisagov/lineage/skeleton
Browse files Browse the repository at this point in the history
⚠️ CONFLICT! Lineage pull request for: skeleton
  • Loading branch information
jsf9k committed Feb 9, 2023
2 parents d8e4c9f + e4930a9 commit 6106d4e
Show file tree
Hide file tree
Showing 11 changed files with 240 additions and 43 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# These owners will be the default owners for everything in the
# repo. Unless a later match takes precedence, these owners will be
# requested for review when someone opens a pull request.
* @dav3r @felddy @jsf9k
* @dav3r @felddy @jsf9k @mcdonnnj

# These folks own any files in the .github directory at the root of
# the repository and any of its subdirectories.
Expand Down
7 changes: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,16 @@ updates:
schedule:
interval: "weekly"
ignore:
# Managed by cisagov/skeleton-generic
- dependency-name: actions/cache
- dependency-name: actions/checkout
- dependency-name: actions/setup-go
- dependency-name: actions/setup-python
- dependency-name: hashicorp/setup-terraform
- dependency-name: mxschmitt/action-tmate
# Managed by cisagov/skeleton-python-library
- dependency-name: actions/download-artifact
- dependency-name: actions/upload-artifact

- package-ecosystem: "pip"
directory: "/"
Expand Down
73 changes: 73 additions & 0 deletions .github/labels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
---
# Rather than breaking up descriptions into multiline strings we disable that
# specific rule in yamllint for this file.
# yamllint disable rule:line-length
- color: "eb6420"
description: This issue or pull request is awaiting the outcome of another issue or pull request
name: blocked
- color: "000000"
description: This issue or pull request involves changes to existing functionality
name: breaking change
- color: "d73a4a"
description: This issue or pull request addresses broken functionality
name: bug
- color: "07648d"
description: This issue will be advertised on code.gov's Open Tasks page (https://code.gov/open-tasks)
name: code.gov
- color: "0366d6"
description: Pull requests that update a dependency file
name: dependencies
- color: "5319e7"
description: This issue or pull request improves or adds to documentation
name: documentation
- color: "cfd3d7"
description: This issue or pull request already exists or is covered in another issue or pull request
name: duplicate
- color: "b005bc"
description: A high-level objective issue encompassing multiple issues instead of a specific unit of work
name: epic
- color: "000000"
description: Pull requests that update GitHub Actions code
name: github-actions
- color: "0e8a16"
description: This issue or pull request is well-defined and good for newcomers
name: good first issue
- color: "ff7518"
description: Pull request that should count toward Hacktoberfest participation
name: hacktoberfest-accepted
- color: "a2eeef"
description: This issue or pull request will add or improve functionality, maintainability, or ease of use
name: improvement
- color: "fef2c0"
description: This issue or pull request is not applicable, incorrect, or obsolete
name: invalid
- color: "ce099a"
description: This pull request is ready to merge during the next Lineage Kraken release
name: kraken 🐙
- color: "a4fc5d"
description: This issue or pull request requires further information
name: need info
- color: "fcdb45"
description: This pull request is awaiting an action or decision to move forward
name: on hold
- color: "3772a4"
description: Pull requests that update Python code
name: python
- color: "ef476c"
description: This issue is a request for information or needs discussion
name: question
- color: "d73a4a"
description: This issue or pull request addresses a security issue
name: security
- color: "00008b"
description: This issue or pull request adds or otherwise modifies test code
name: test
- color: "1d76db"
description: This issue or pull request pulls in upstream updates
name: upstream update
- color: "d4c5f9"
description: This issue or pull request increments the version number
name: version bump
- color: "ffffff"
description: This issue will not be incorporated
name: wontfix
111 changes: 90 additions & 21 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,28 +21,24 @@ jobs:
uses: cisagov/setup-env-github-action@develop
- uses: actions/checkout@v3
- id: setup-python
uses: actions/setup-python@v3
uses: actions/setup-python@v4
with:
python-version: "3.10"
# We need the Go version and Go cache location for the actions/cache step,
# so the Go installation must happen before that.
- uses: actions/setup-go@v2
- id: setup-go
uses: actions/setup-go@v3
with:
go-version: "1.16"
- name: Store installed Go version
id: go-version
run: |
echo "::set-output name=version::"\
"$(go version | sed 's/^go version go\([0-9.]\+\) .*/\1/')"
go-version: "1.19"
- name: Lookup Go cache directory
id: go-cache
run: |
echo "::set-output name=dir::$(go env GOCACHE)"
echo "dir=$(go env GOCACHE)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
env:
BASE_CACHE_KEY: "${{ github.job }}-${{ runner.os }}-\
py${{ steps.setup-python.outputs.python-version }}-\
go${{ steps.go-version.outputs.version }}-\
go${{ steps.setup-go.outputs.go-version }}-\
packer${{ steps.setup-env.outputs.packer-version }}-\
tf${{ steps.setup-env.outputs.terraform-version }}-"
with:
Expand Down Expand Up @@ -82,7 +78,7 @@ jobs:
${{ env.CURL_CACHE_DIR }}/"${PACKER_ZIP}"
sudo mv /usr/local/bin/packer /usr/local/bin/packer-default
sudo ln -s /opt/packer/packer /usr/local/bin/packer
- uses: hashicorp/setup-terraform@v1
- uses: hashicorp/setup-terraform@v2
with:
terraform_version: ${{ steps.setup-env.outputs.terraform-version }}
- name: Install shfmt
Expand All @@ -107,20 +103,26 @@ jobs:
uses: mxschmitt/action-tmate@v3
if: env.RUN_TMATE
test:
runs-on: ubuntu-latest
name: test source - py${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
python-version:
- "3.6"
- "3.7"
- "3.8"
- "3.9"
- "3.10"
- "3.11"
include:
- os: ubuntu-20.04
python-version: "3.6"
steps:
- uses: actions/checkout@v3
- id: setup-python
uses: actions/setup-python@v3
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- uses: actions/cache@v3
Expand Down Expand Up @@ -159,11 +161,12 @@ jobs:
if: env.RUN_TMATE
coveralls-finish:
runs-on: ubuntu-latest
needs: test
needs:
- test
steps:
- uses: actions/checkout@v3
- id: setup-python
uses: actions/setup-python@v3
uses: actions/setup-python@v4
with:
python-version: "3.10"
- uses: actions/cache@v3
Expand Down Expand Up @@ -193,21 +196,29 @@ jobs:
uses: mxschmitt/action-tmate@v3
if: env.RUN_TMATE
build:
runs-on: ubuntu-latest
needs: [lint, test]
name: build wheel - py${{ matrix.python-version }}
needs:
- lint
- test
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
python-version:
- "3.6"
- "3.7"
- "3.8"
- "3.9"
- "3.10"
- "3.11"
include:
- os: ubuntu-20.04
python-version: "3.6"
steps:
- uses: actions/checkout@v3
- id: setup-python
uses: actions/setup-python@v3
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- uses: actions/cache@v3
Expand All @@ -231,10 +242,68 @@ jobs:
- name: Build artifacts
run: python -m build
- name: Upload artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: dist-${{ matrix.python-version }}
path: dist
- name: Setup tmate debug session
uses: mxschmitt/action-tmate@v3
if: env.RUN_TMATE
test-build:
name: test built wheel - py${{ matrix.python-version }}
needs:
- build
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
python-version:
- "3.7"
- "3.8"
- "3.9"
- "3.10"
- "3.11"
include:
- os: ubuntu-20.04
python-version: "3.6"
steps:
- uses: actions/checkout@v3
- id: setup-python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- uses: actions/cache@v3
env:
BASE_CACHE_KEY: "${{ github.job }}-${{ runner.os }}-\
py${{ steps.setup-python.outputs.python-version }}-"
with:
path: ${{ env.PIP_CACHE_DIR }}
# We do not use '**/setup.py' in the cache key so only the 'setup.py'
# file in the root of the repository is used. This is in case a Python
# package were to have a 'setup.py' as part of its internal codebase.
key: "${{ env.BASE_CACHE_KEY }}\
${{ hashFiles('**/requirements.txt') }}-\
${{ hashFiles('setup.py') }}"
restore-keys: |
${{ env.BASE_CACHE_KEY }}
- name: Retrieve the built wheel
uses: actions/download-artifact@v3
with:
name: dist-${{ matrix.python-version }}
path: dist
- id: find-wheel
name: Get the name of the retrieved wheel (there should only be one)
run: echo "wheel=$(ls dist/*whl)" >> $GITHUB_OUTPUT
- name: Update core Python packages
run: python -m pip install --upgrade pip setuptools wheel
- name: Install the built wheel (along with testing dependencies)
run: python -m pip install ${{ steps.find-wheel.outputs.wheel }}[test]
- name: Run tests
env:
RELEASE_TAG: ${{ github.event.release.tag_name }}
run: pytest
- name: Setup tmate debug session
uses: mxschmitt/action-tmate@v3
if: env.RUN_TMATE
29 changes: 29 additions & 0 deletions .github/workflows/sync-labels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
name: sync-labels

on:
push:
paths:
- '.github/labels.yml'
- '.github/workflows/sync-labels.yml'

permissions:
contents: read

jobs:
labeler:
permissions:
# actions/checkout needs this to fetch code
contents: read
# crazy-max/ghaction-github-labeler needs this to manage repository labels
issues: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Sync repository labels
if: success()
uses: crazy-max/ghaction-github-labeler@v4
with:
# This is a hideous ternary equivalent so we only do a dry run unless
# this workflow is triggered by the develop branch.
dry-run: ${{ github.ref_name == 'develop' && 'false' || 'true' }}

0 comments on commit 6106d4e

Please sign in to comment.