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

OSOE-188: YAML Linting #647

Merged
merged 65 commits into from
Jan 26, 2024
Merged
Show file tree
Hide file tree
Changes from 56 commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
7b77f33
Add linting step for YAML files to GHA workflow
tteguayco Dec 11, 2023
d03f93e
Add workflow_dispatch to build-and-test.yml file
tteguayco Dec 11, 2023
9b4a74b
Add run github workflow run condition for current branch
tteguayco Dec 11, 2023
62d25c8
Add checkout action
tteguayco Dec 11, 2023
b877f1a
Update target files for linting
tteguayco Dec 11, 2023
efb52b8
Set yaml-linting step as a reusable action
tteguayco Dec 11, 2023
8964197
Add workflow extension
tteguayco Dec 11, 2023
756c050
Checkout missing diff file
tteguayco Dec 11, 2023
fa2cdb3
Point to actions in feature branch
tteguayco Dec 11, 2023
84155b7
Dummy change to trigger GHA
tteguayco Dec 11, 2023
f35cf4a
Fix yaml-linting job name
tteguayco Dec 11, 2023
6293b74
Add trailing space on purpose
tteguayco Dec 11, 2023
5533f35
Add parameter inputs to yaml-linting step
tteguayco Dec 11, 2023
028d359
Add non-existing path
tteguayco Dec 11, 2023
13d160a
Add wrong parameter name
tteguayco Dec 11, 2023
3eb0af2
Revert wrong config file path
tteguayco Dec 11, 2023
4255703
Correct file path
tteguayco Dec 11, 2023
04afe9a
Set search path to .github
tteguayco Dec 11, 2023
91b1267
Set quoted strings to true
tteguayco Dec 11, 2023
13efd10
Revert quoted-strings to false
tteguayco Dec 11, 2023
76fbd00
Remove references to feature branch
tteguayco Dec 11, 2023
fe968ea
Clean up yml file
tteguayco Dec 11, 2023
2d14fd2
Fix trailing spaces
tteguayco Dec 16, 2023
03e0825
Fix trailing whitespaces in Lombiq.GitHub.Actions
tteguayco Dec 16, 2023
f3b9b99
Add YAML linting instructions
tteguayco Dec 16, 2023
ee56aac
Add 'runtimes' as allowed word
tteguayco Dec 16, 2023
c02c1f9
Update submodules
tteguayco Dec 16, 2023
da34e7d
Changes in Lombiq/GitHub.Actions
tteguayco Dec 18, 2023
20b0b58
Change references to new feature branch in new yaml linting workflow
tteguayco Dec 18, 2023
1436fb6
Change references to new feature branch in new yaml linting workflow
tteguayco Dec 18, 2023
9e49b93
Remove extra whitespaces
tteguayco Dec 18, 2023
e8a8823
Open brances in new line
tteguayco Dec 18, 2023
d0eb3d8
Change reference to feature branch for get-changed-files-from-git-dif…
tteguayco Dec 18, 2023
594753b
Change reference to feature branch for get-changed-files-from-git-dif…
tteguayco Dec 18, 2023
00c40fa
Typo
tteguayco Dec 18, 2023
0e9d429
Add runtimes as valid work for spell checker
tteguayco Dec 23, 2023
ec51bc8
Replace if-else with Test-Path by Try-Catch
tteguayco Dec 23, 2023
800eb53
Add previous if-else to workflow filtering logic
tteguayco Dec 23, 2023
a936096
Update target branch in GHA workflow
tteguayco Dec 23, 2023
edc03fc
Update Lombiq.Github.Actions
tteguayco Dec 23, 2023
f8aa6da
Solve merge conflicts
tteguayco Dec 23, 2023
dad09bb
Start brace in a new line
tteguayco Dec 23, 2023
1159546
Solve merge conflicts
tteguayco Dec 27, 2023
187c524
Use yamllint rules file from LGHA on OSOCE
tteguayco Dec 28, 2023
6c0f1cf
Remove machine-type parameter from GHA workflow
tteguayco Dec 28, 2023
aed9c19
Remove machine-type parameter from GHA workflow
tteguayco Dec 28, 2023
249acb4
Set quotes style for YAML linting
tteguayco Dec 28, 2023
1b22650
Improve documentation for YAML linting workflow
tteguayco Dec 28, 2023
aec8470
Fix markdown styles
tteguayco Dec 28, 2023
1aac323
Update search-path for yaml linting
tteguayco Dec 28, 2023
77a79f7
Remove trailing whitespace
tteguayco Dec 28, 2023
22591ad
Solve merge conflicts
tteguayco Jan 8, 2024
b1cc903
Add required new line
tteguayco Jan 8, 2024
83a2e55
Fix hyperlink
tteguayco Jan 8, 2024
8e37758
Update git submodules
tteguayco Jan 11, 2024
960e735
Solve merge conflict
tteguayco Jan 16, 2024
d410777
Update doc
tteguayco Jan 16, 2024
665444d
Rename ps script file
tteguayco Jan 16, 2024
38246fb
Apply file lookup only on .github folder
tteguayco Jan 23, 2024
2a84ffc
Update branch ref
tteguayco Jan 23, 2024
d960a07
Revert branch ref
tteguayco Jan 23, 2024
b762bc1
Remove unnecessary try-catch block
tteguayco Jan 25, 2024
b7f5116
Updating Lombiq.Analyzers.PowerShell and Lombiq.GitHub.Actions to lat…
DemeSzabolcs Jan 26, 2024
bc27b3c
Merge remote-tracking branch 'origin/dev' into issue/OSOE-188
DemeSzabolcs Jan 26, 2024
5734492
Updating Lombiq.GitHub.Actions to latest dev
DemeSzabolcs Jan 26, 2024
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
3 changes: 3 additions & 0 deletions .github/YAMLLinting.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Linting YAML

YAML files for GitHub Actions can be linted using `yamllint`. Please refer to [this documentation in Lombiq.Github.Actions](https://github.com/Lombiq/GitHub-Actions/blob/issue/OSOE-188/Docs/Workflows/Productivity/YamlLinting.md) to know more.
1 change: 1 addition & 0 deletions .github/actions/spelling/allow.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ parallelizable
qrcode
retriable
Runtimes
runtimes
sanitizers
scrollbars
shortcutting
Expand Down
13 changes: 10 additions & 3 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ jobs:
name: Build and Test - NuGetTest solution
uses: Lombiq/GitHub-Actions/.github/workflows/build-and-test-orchard-core.yml@dev
with:
parent-job-name: "nuget-solution"
parent-job-name: nuget-solution
build-directory: NuGetTest
timeout-minutes: 15
blame-hang-timeout: "5m"
blame-hang-timeout: 5m

spelling:
name: Spelling
Expand All @@ -68,7 +68,14 @@ jobs:
name: PowerShell Static Code Analysis
uses: Lombiq/PowerShell-Analyzers/.github/workflows/static-code-analysis.yml@dev
with:
machine-types: "['ubuntu-22.04']"
machine-types: '["ubuntu-22.04"]'

yaml-linting:
name: YAML Linting
uses: Lombiq/GitHub-Actions/.github/workflows/yaml-lint.yml@issue/OSOE-188
with:
config-file-path: tools/Lombiq.GitHub.Actions/.trunk/configs/.yamllint.yaml
search-path: .
DemeSzabolcs marked this conversation as resolved.
Show resolved Hide resolved

post-pull-request-checks-automation:
name: Post Pull Request Checks Automation
Expand Down
8 changes: 8 additions & 0 deletions .trunk/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
*out
*logs
*actions
*notifications
*tools
plugins
user_trunk.yaml
user.yaml
24 changes: 24 additions & 0 deletions .trunk/trunk.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# This file controls the behavior of Trunk: https://docs.trunk.io/cli
# To learn more about the format of this file, see https://docs.trunk.io/reference/trunk-yaml
version: 0.1
cli:
version: 1.17.2
# Trunk provides extensibility via plugins. (https://docs.trunk.io/plugins)
plugins:
sources:
- id: trunk
ref: v1.3.0
uri: https://github.com/trunk-io/plugins
# Many linters and tools depend on runtimes - configure them here. (https://docs.trunk.io/runtimes)
runtimes:
enabled:
- [email protected]
- [email protected]
# This is the section where you manage your linters. (https://docs.trunk.io/check/configuration)
lint:
definitions:
- name: yamllint
commands:
- run: yamllint -c ./tools/Lombiq.GitHub.Actions/.trunk/configs/.yamllint.yaml -f parsable ${target}
DemeSzabolcs marked this conversation as resolved.
Show resolved Hide resolved
enabled:
- [email protected]
Loading