-
Notifications
You must be signed in to change notification settings - Fork 8
feat(actions): added YAML linting action using yamlfmt, and linted existing YAML files
#6075
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
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
0656f4a
Added workflow to lint YAML files using yamlfmt
tombch f05aa67
Trim trailing whitespace setting preserves multi-line run/script tags…
tombch c60d881
Formatted yaml files
tombch ceea7e9
Only runs on main branch and prs
tombch 1e7901a
Revert "Only runs on main branch and prs"
tombch 1b3dac8
Revert "Formatted yaml files"
tombch 2084ae5
Only run on push to main branch and prs
tombch 3772057
Excluding workflows from formatting/linting
tombch 547af7e
Reformatted other yaml files
tombch 6c6aef9
Merge branch 'main' into yamlfmt-lint
tombch 19eafba
Merge branch 'main' into yamlfmt-lint
tombch 6471204
Pinned yamlfmt to latest version 0.21.0
tombch File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| name: yamlfmt-lint | ||
| on: | ||
| pull_request: | ||
| push: | ||
| branches: | ||
| - main | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| lint: | ||
| runs-on: ubuntu-latest | ||
| container: | ||
| image: ghcr.io/google/yamlfmt:0.21.0 | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v6 | ||
|
|
||
| - name: Run yamlfmt lint | ||
| run: yamlfmt -lint . |
This file contains hidden or 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,36 +1,36 @@ | ||
| repos: | ||
| - repo: https://github.com/astral-sh/ruff-pre-commit | ||
| # Ruff version. | ||
| rev: v0.14.2 | ||
| hooks: | ||
| # Run the linter and fix issues. | ||
| - id: ruff-check | ||
| args: [ --fix ] | ||
| files: ^ena-submission/ | ||
| # Run lint but only fix auto-fixable issues. | ||
| - id: ruff-check | ||
| args: [ --fix-only ] | ||
| files: ^preprocessing/nextclade/ | ||
| # Run the formatter. | ||
| - id: ruff-format | ||
| files: ^ena-submission/|^preprocessing/nextclade/ | ||
| - repo: local | ||
| hooks: | ||
| - id: prettier-values-schema | ||
| name: prettier (values.schema.json) | ||
| entry: npx prettier@3.6.2 --write | ||
| language: system | ||
| files: ^kubernetes/loculus/values\.schema\.json$ | ||
| - id: helm-lint | ||
| name: helm lint | ||
| entry: bash | ||
| args: | ||
| - -c | ||
| - | | ||
| set -euo pipefail | ||
| helm lint kubernetes/loculus -f kubernetes/loculus/values.yaml | ||
| helm lint kubernetes/loculus -f kubernetes/loculus/values.yaml -f kubernetes/loculus/values_e2e_and_dev.yaml | ||
| helm lint kubernetes/loculus -f kubernetes/loculus/values.yaml -f kubernetes/loculus/values_preview_server.yaml | ||
| language: system | ||
| pass_filenames: false | ||
| files: ^kubernetes/loculus/ | ||
| - repo: https://github.com/astral-sh/ruff-pre-commit | ||
| # Ruff version. | ||
| rev: v0.14.2 | ||
| hooks: | ||
| # Run the linter and fix issues. | ||
| - id: ruff-check | ||
| args: [--fix] | ||
| files: ^ena-submission/ | ||
| # Run lint but only fix auto-fixable issues. | ||
| - id: ruff-check | ||
| args: [--fix-only] | ||
| files: ^preprocessing/nextclade/ | ||
| # Run the formatter. | ||
| - id: ruff-format | ||
| files: ^ena-submission/|^preprocessing/nextclade/ | ||
| - repo: local | ||
| hooks: | ||
| - id: prettier-values-schema | ||
| name: prettier (values.schema.json) | ||
| entry: npx prettier@3.6.2 --write | ||
| language: system | ||
| files: ^kubernetes/loculus/values\.schema\.json$ | ||
| - id: helm-lint | ||
| name: helm lint | ||
| entry: bash | ||
| args: | ||
| - -c | ||
| - | | ||
| set -euo pipefail | ||
| helm lint kubernetes/loculus -f kubernetes/loculus/values.yaml | ||
| helm lint kubernetes/loculus -f kubernetes/loculus/values.yaml -f kubernetes/loculus/values_e2e_and_dev.yaml | ||
| helm lint kubernetes/loculus -f kubernetes/loculus/values.yaml -f kubernetes/loculus/values_preview_server.yaml | ||
| language: system | ||
| pass_filenames: false | ||
| files: ^kubernetes/loculus/ | ||
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
|
|
@@ -14,4 +14,4 @@ auth: | |
| verifyEmail: false | ||
| host: localhost:3000 | ||
| siloImport: | ||
| pollIntervalSeconds: 5 | ||
| pollIntervalSeconds: 5 | ||
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -140,4 +140,4 @@ defaultResources: | |
| cpu: "20m" | ||
| limits: | ||
| memory: "1Gi" | ||
| cpu: "20m" | ||
| cpu: "20m" | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.