Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reconfigure pre-commit validation #1427

Merged
merged 3 commits into from
Jan 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
12 changes: 0 additions & 12 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,6 @@ on:
- '*'

jobs:
linting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Poetry
uses: snok/install-poetry@v1
- name: Install dependencies
run: poetry install --no-interaction --all-extras
- name: run pre-commit
run: poetry run pre-commit run --all-files --show-diff-on-failure

packaging:
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -101,7 +90,6 @@ jobs:

integration-tests:
needs:
- linting
- packaging
- documentation
- unit-tests
Expand Down
11 changes: 7 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,15 +119,18 @@ $ git checkout -b <branch-name>
As a pre-deployment step we syntatically validate files with
[pre-commit](https://pre-commit.com).

Please [install pre-commit](https://pre-commit.com/#install) then run
`pre-commit install` to setup the git hooks. Once configured the pre-commit
linters will automatically run on every git commit. Alternatively you
can manually execute the validations by running `pre-commit run --all-files`.
Run `poetry run pre-commit install` to setup the git hooks. Once configured
the pre-commit linters will automatically run on every git commit.
Alternatively you can manually execute the validations by running

```bash
$ poetry run pre-commit run --all-files
```

The CI for pre-commit has been offloaded to [pre-commit.ci](https://pre-commit.ci)
The configuration is in the [pre-commit-config.yaml](.pre-commit-config.yaml)
file.

## Unit Tests

Sceptre aims to be compatible with Python 3, please run unit test
Expand Down