Skip to content

Commit

Permalink
Merge pull request #60 from cisagov/bugfix/remove_custom_pre-commit
Browse files Browse the repository at this point in the history
Revert to Unmodified pre-commit Configuration in GitHub Actions Workflow
  • Loading branch information
mcdonnnj authored Dec 3, 2020
2 parents 5e02f29 + 7bf8592 commit 2d76637
Showing 1 changed file with 2 additions and 17 deletions.
19 changes: 2 additions & 17 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,23 +87,8 @@ jobs:
pip install --upgrade --requirement requirements-test.txt
- name: Set up pre-commit hook environments
run: pre-commit install-hooks
- name: Create modified GitHub Actions pre-commit configuration
run: |
sed '/terraform_validate/d' < .pre-commit-config.yaml \
> /tmp/.github-actions-pre-commit-config.yaml
- name: Run pre-commit with modified configuration file on all files
# We run pre-commit here with a custom configuration that has
# the terraform-validate hook removed. This is because
# terraform validate cannot currently run without accessing
# the remote state because of the way the providers are
# defined in providers.tf. This is something that may be
# remedied in the future. For more information, check out
# these two GitHub issues:
# * https://github.com/hashicorp/terraform/issues/15895
# * https://github.com/hashicorp/terraform/issues/15811
run: |
pre-commit run --all-files \
--config=/tmp/.github-actions-pre-commit-config.yaml
- name: Run pre-commit on all files
run: pre-commit run --all-files
test:
runs-on: ubuntu-latest
steps:
Expand Down

0 comments on commit 2d76637

Please sign in to comment.