Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…/skeleton
  • Loading branch information
mcdonnnj committed May 29, 2023
2 parents 54b6bb7 + ea4912c commit 6c5f4ef
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 27 deletions.
4 changes: 2 additions & 2 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
# 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 @mcdonnnj
* @dav3r @felddy @jasonodoom @jsf9k @mcdonnnj

# These folks own any files in the .github directory at the root of
# the repository and any of its subdirectories.
/.github/ @dav3r @felddy @jsf9k @mcdonnnj
/.github/ @dav3r @felddy @jasonodoom @jsf9k @mcdonnnj
3 changes: 3 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ updates:
- 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
3 changes: 3 additions & 0 deletions .github/labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@
- 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
Expand Down
29 changes: 17 additions & 12 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ jobs:
- id: setup-python
uses: actions/setup-python@v4
with:
python-version: "3.10"
python-version: "3.11"
# We need the Go version and Go cache location for the actions/cache step,
# so the Go installation must happen before that.
- id: setup-go
uses: actions/setup-go@v3
uses: actions/setup-go@v4
with:
go-version: "1.19"
- name: Lookup Go cache directory
Expand Down Expand Up @@ -93,7 +93,7 @@ jobs:
run: go install ${PACKAGE_URL}@${PACKAGE_VERSION}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade pip setuptools wheel
pip install --upgrade --requirement requirements-test.txt
- name: Set up pre-commit hook environments
run: pre-commit install-hooks
Expand All @@ -103,6 +103,7 @@ jobs:
uses: mxschmitt/action-tmate@v3
if: env.RUN_TMATE
test:
name: test source - py${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
Expand Down Expand Up @@ -195,10 +196,11 @@ jobs:
uses: mxschmitt/action-tmate@v3
if: env.RUN_TMATE
build:
runs-on: ${{ matrix.os }}
name: build wheel - py${{ matrix.python-version }}
needs:
- lint
- test
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -240,17 +242,18 @@ 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:
runs-on: ${{ matrix.os }}
name: test built wheel - py${{ matrix.python-version }}
needs:
- build
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -289,12 +292,14 @@ jobs:
uses: actions/download-artifact@v3
with:
name: dist-${{ matrix.python-version }}
- name: Install testing dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install --upgrade pytest pytest-cov
- name: Install the built wheel (there should only be one)
run: python -m pip install *.whl
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 }}
Expand Down
26 changes: 13 additions & 13 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ default_language_version:

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
rev: v4.4.0
hooks:
- id: check-case-conflict
- id: check-executables-have-shebangs
Expand All @@ -31,32 +31,32 @@ repos:

# Text file hooks
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.32.2
rev: v0.33.0
hooks:
- id: markdownlint
args:
- --config=.mdl_config.yaml
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.0.0-alpha.4
rev: v3.0.0-alpha.6
hooks:
- id: prettier
- repo: https://github.com/adrienverge/yamllint
rev: v1.28.0
rev: v1.30.0
hooks:
- id: yamllint
args:
- --strict

# GitHub Actions hooks
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.18.4
rev: 0.22.0
hooks:
- id: check-github-actions
- id: check-github-workflows

# pre-commit hooks
- repo: https://github.com/pre-commit/pre-commit
rev: v2.20.0
rev: v3.2.1
hooks:
- id: validate_manifest

Expand All @@ -83,7 +83,7 @@ repos:
# Python hooks
# Run bandit on the "tests" tree with a configuration
- repo: https://github.com/PyCQA/bandit
rev: 1.7.4
rev: 1.7.5
hooks:
- id: bandit
name: bandit (tests tree)
Expand All @@ -98,27 +98,27 @@ repos:
name: bandit (everything else)
exclude: tests
- repo: https://github.com/psf/black
rev: 22.10.0
rev: 23.1.0
hooks:
- id: black
- repo: https://github.com/PyCQA/flake8
rev: 5.0.4
rev: 6.0.0
hooks:
- id: flake8
additional_dependencies:
- flake8-docstrings
- repo: https://github.com/PyCQA/isort
rev: 5.10.1
rev: 5.12.0
hooks:
- id: isort
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.990
rev: v1.1.1
hooks:
- id: mypy
additional_dependencies:
- types-setuptools
- repo: https://github.com/asottile/pyupgrade
rev: v3.2.0
rev: v3.3.1
hooks:
- id: pyupgrade

Expand All @@ -131,7 +131,7 @@ repos:

# Terraform hooks
- repo: https://github.com/antonbabenko/pre-commit-terraform
rev: v1.76.0
rev: v1.77.1
hooks:
- id: terraform_fmt
- id: terraform_validate
Expand Down

0 comments on commit 6c5f4ef

Please sign in to comment.