forked from netbox-community/devicetype-library
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix pre-commit and update CI (netbox-community#875)
- Loading branch information
1 parent
551b097
commit 66c7560
Showing
5 changed files
with
20 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,30 @@ | ||
--- | ||
name: Validate definitions | ||
|
||
on: | ||
|
||
on: # yamllint disable-line rule:truthy | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v1 | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: 3.8 | ||
|
||
- name: Install dependencies | ||
run: pip install -r requirements.txt | ||
|
||
- name: Lint YAML files | ||
run: yamllint --format parsable --strict -c=tests/yamllint.yaml device-types/ module-types/ | ||
run: | | ||
yamllint --format github --strict \ | ||
device-types/ module-types/ | ||
- name: Run tests | ||
run: pytest --tb=short -v |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,20 @@ | ||
--- | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v3.4.0 | ||
rev: v4.3.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: end-of-file-fixer | ||
- id: check-yaml | ||
name: Check YAML files | ||
- repo: https://github.com/jumanjihouse/pre-commit-hook-yamlfmt | ||
rev: 0.1.0 | ||
rev: 0.2.2 | ||
hooks: | ||
- id: yamlfmt | ||
args: [--mapping, '2', --sequence, '4', --offset, '2'] | ||
- repo: https://github.com/adrienverge/yamllint.git | ||
rev: v1.26.0 | ||
rev: v1.27.1 | ||
hooks: | ||
- id: yamllint | ||
name: Lint YAML files | ||
args: [--format, parsable, --strict, -c=tests/yamllint.yaml] | ||
args: [--format, parsable, --strict] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
jsonschema==3.2.0 | ||
pytest==5.3.2 | ||
PyYAML==5.4 | ||
yamllint==1.26.0 | ||
yamllint==1.27.1 |