Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
bf36608
Add .mypy_cache to .gitignore
jsf9k Mar 2, 2020
c7f339f
Merge pull request #36 from cisagov/improvement/add-mypy-cache-to-git…
jsf9k Mar 2, 2020
454864b
Incorporate the Python version into keys for pip and pre-commit caches.
mcdonnnj Mar 3, 2020
b58f7a1
Merge pull request #37 from cisagov/add_python_version_to_cache_keys
mcdonnnj Mar 3, 2020
478f168
Change the cache paths from hardcoded values in their appropriate blo…
mcdonnnj Mar 4, 2020
241484a
Merge pull request #38 from cisagov/change_cache_paths_to_env_variables
mcdonnnj Mar 4, 2020
d791334
Add a rule for markdownlint to allow multiple headers with the same n…
mcdonnnj Mar 4, 2020
f5fd431
Merge pull request #39 from cisagov/add_mdl_rule_for_MD024
mcdonnnj Mar 4, 2020
61790a9
Fixed broken hook id for pre-commit-terraform:
mcdonnnj Mar 31, 2020
757a861
Merge pull request #40 from cisagov/improvements/update_pre-commit
mcdonnnj Mar 31, 2020
0bc1aab
Ran `pre-commit autoupdate` to get the latest version of the
mcdonnnj Apr 6, 2020
b01a0ee
Explicitly install pre-commit hooks as its own step so it's clearer w…
mcdonnnj Apr 6, 2020
1f3d440
Rename action to accurately reflect that we are only linting, not bui…
mcdonnnj Apr 6, 2020
647b351
Sort .gitignore entries.
mcdonnnj Apr 6, 2020
89b098a
Merge pull request #41 from cisagov/bugfix/update_pre-commit_for_pre-…
mcdonnnj Apr 7, 2020
c8b4bcf
Update CODEOWNERS
hillaryj Apr 14, 2020
175ae71
Merge pull request #42 from cisagov/hillaryj-owner
hillaryj Apr 15, 2020
8c99c52
Allow events from apb to rebuild this repository weekly.
felddy May 1, 2020
3301dfa
Merge pull request #43 from cisagov/improvement/apb-events
felddy May 1, 2020
f31c1e8
Merge https://github.com/cisagov/skeleton-generic into lineage/skeleton
May 13, 2020
a18897d
Update .pre-commit-config.yaml
felddy May 13, 2020
18052d4
Update .gitignore
felddy May 13, 2020
2e56827
Resolve upstream change to isort-seed hook.
felddy May 13, 2020
d8125c3
Fix typo in comment.
felddy May 13, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 21 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,37 +1,49 @@
---
name: build

on: [
push,
pull_request
]
on:
push:
pull_request:
repository_dispatch:
types: [apb]

env:
PIP_CACHE_DIR: ~/.cache/pip
PRE_COMMIT_CACHE_DIR: ~/.cache/pre-commit

jobs:
build:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Store installed Python version
run: |
echo "::set-env name=PY_VERSION::"\
"$(python -c "import platform;print(platform.python_version())")"
- name: Cache pip test requirements
uses: actions/cache@v1
with:
path: ~/.cache/pip
key: "${{ runner.os }}-pip-test-\
path: ${{ env.PIP_CACHE_DIR }}
key: "${{ runner.os }}-pip-test-py${{ env.PY_VERSION }}-\
${{ hashFiles('**/requirements-test.txt') }}"
restore-keys: |
${{ runner.os }}-pip-test-py${{ env.PY_VERSION }}-
${{ runner.os }}-pip-test-
${{ runner.os }}-pip-
- name: Cache pre-commit hooks
uses: actions/cache@v1
with:
path: ~/.cache/pre-commit
key: "${{ runner.os }}-pre-commit-\
path: ${{ env.PRE_COMMIT_CACHE_DIR }}
key: "${{ runner.os }}-pre-commit-py${{ env.PY_VERSION }}-\
${{ hashFiles('**/.pre-commit-config.yaml') }}"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install --upgrade --requirement requirements-test.txt
- name: Set up pre-commit hook environments
run: pre-commit install-hooks
- name: Run pre-commit on all files
run: pre-commit run --all-files
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
*.egg-info
__pycache__
.python-version
.coverage
.mypy_cache
.pytest_cache
.python-version
*.egg-info
3 changes: 3 additions & 0 deletions .mdl_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,8 @@
"code_blocks": false,
"tables": false
},
"MD024": {
"allow_different_nesting": true
},
"default": true
}
24 changes: 12 additions & 12 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ repos:
args:
- --config=.mdl_config.json
- repo: https://github.com/adrienverge/yamllint
rev: v1.20.0
rev: v1.21.0
hooks:
- id: yamllint
- repo: https://github.com/detailyang/pre-commit-shell
Expand All @@ -47,7 +47,7 @@ repos:
additional_dependencies:
- flake8-docstrings
- repo: https://github.com/asottile/pyupgrade
rev: v2.0.0
rev: v2.1.0
hooks:
- id: pyupgrade
- repo: https://github.com/PyCQA/bandit
Expand All @@ -60,12 +60,12 @@ repos:
rev: 19.10b0
hooks:
- id: black
# Disabling seed-isort-config since it doesn't identifying docopt, et al.
# as third-party libraries.
#- repo: https://github.com/asottile/seed-isort-config
# rev: v1.9.4
# hooks:
# - id: seed-isort-config
# Disabling seed-isort-config in this project (development-guide) since it
# doesn't identify docopt, et al. as third-party libraries.
# - repo: https://github.com/asottile/seed-isort-config
# rev: v2.1.0
# hooks:
# - id: seed-isort-config
- repo: https://github.com/pre-commit/mirrors-isort
# pick the isort version you'd like to use from
# https://github.com/pre-commit/mirrors-isort/releases
Expand All @@ -78,19 +78,19 @@ repos:
- id: ansible-lint
# files: molecule/default/playbook.yml
- repo: https://github.com/antonbabenko/pre-commit-terraform.git
rev: v1.12.0
rev: v1.29.0
hooks:
- id: terraform_fmt
- id: terraform_validate_no_variables
- id: terraform_validate
- repo: https://github.com/IamTheFij/docker-pre-commit
rev: v1.0.1
hooks:
- id: docker-compose-check
- repo: https://github.com/prettier/prettier
rev: 1.19.1
rev: 2.0.4
hooks:
- id: prettier
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.761
rev: v0.770
hooks:
- id: mypy