Skip to content
This repository has been archived by the owner on Aug 29, 2023. It is now read-only.

check github actions yamls #272

Merged
merged 5 commits into from
Jan 11, 2022
Merged

check github actions yamls #272

merged 5 commits into from
Jan 11, 2022

Conversation

galargh
Copy link
Contributor

@galargh galargh commented Jan 7, 2022

Resolves #76

Description

This PR adds GitHub workflow that runs on PR in this repo which performs YAML linting. It gets the correct schema from https://www.schemastore.org/api/json/catalog.json (same as VS Code YAML extension).

I target next in this PR because I had to modify go-test.yml slightly to make the linter happy.

@galargh galargh changed the base branch from master to next January 7, 2022 17:22
@galargh galargh force-pushed the lint branch 2 times, most recently from b75f9e0 to d7fcb24 Compare January 7, 2022 17:23
@galargh galargh marked this pull request as ready for review January 7, 2022 17:35
.github/workflows/check-yaml.yml Outdated Show resolved Hide resolved
@@ -10,8 +10,8 @@ jobs:
go: [ "1.16.x", "1.17.x" ]
env:
COVERAGES: ""
runs-on: ${{ matrix.os }}-latest
name: ${{ matrix.os}} (go ${{ matrix.go }})
runs-on: ${{ format('${0}-latest', matrix.os) }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

was the old syntax wrong? I'm a bit confused because it apparently worked just fine :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It worked but the schema from https://json.schemastore.org/github-workflow.json didn't account for it. I'll see if there's a way to express what we were doing in that schema - if so I'll create a PR but, personally, I'd be fine with the setup proposed here too.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. Slight preference for keeping what we had, because it was simpler, but I also don't think it matters too much :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had a look at JSON schema and it seems it'd be quite complicated to add that runs-on accepts any prefix of a valid runner name + expression syntax + any suffix of a valid runner name so if you don't mind, I'd stick with the string format.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SGTM! Thanks for being thorough :)

.github/workflows/check-yaml.yml Outdated Show resolved Hide resolved
@galargh galargh merged commit 0454bfc into next Jan 11, 2022
@galargh galargh deleted the lint branch January 11, 2022 09:50
galargh added a commit that referenced this pull request Apr 4, 2022
* Revert "include cross-package coverage in codecov"

* Revert "Revert "include cross-package coverage in codecov""

* Make automerge a reusable workflow (#260)

* move automerge from template to workflows

* make automerge reusable and use it from new automerge template

* pass parent job name to reusable automerge

* check github actions yamls (#272)

* check github actions yamls

* make yaml linter happy about go-test

* mention VS Code YAML extension in the readme

* add info about other YAML checking extensions

* make yaml checker more generic

* use validate-yaml-schema action from mainline (#277)

* upgrade lewagon/wait-on-check-action to v1.1.1 (#278)

* always add a version.json file if it doesn't exist (#281)

* fix go-test runner string

* check if tag already exists in release-check (#287)

* allow specifying custom PATH for 386 arch (#289)

* go: update to 1.18.x (#307)

* Upgrade staticcheck to v0.3.0 (#311)

* increase sleep between PR creations to 10s

* restore DEFAULT_BRANCH replacement

Co-authored-by: Laurent Senta <[email protected]>
galargh added a commit that referenced this pull request Feb 1, 2023
* Revert "include cross-package coverage in codecov"

* Revert "Revert "include cross-package coverage in codecov""

* Make automerge a reusable workflow (#260)

* move automerge from template to workflows

* make automerge reusable and use it from new automerge template

* pass parent job name to reusable automerge

* check github actions yamls (#272)

* check github actions yamls

* make yaml linter happy about go-test

* mention VS Code YAML extension in the readme

* add info about other YAML checking extensions

* make yaml checker more generic

* use validate-yaml-schema action from mainline (#277)

* upgrade lewagon/wait-on-check-action to v1.1.1 (#278)

* always add a version.json file if it doesn't exist (#281)

* fix go-test runner string

* check if tag already exists in release-check (#287)

* allow specifying custom PATH for 386 arch (#289)

* use pull_request_target event for release-check workflow

* add comment on missing version.json

* chore: revert release checker path trigger change

* chore: add footnote when non-docs files are modified with the release

* fix: prev version calculation
galargh added a commit that referenced this pull request Feb 8, 2023
* Add option to skip `32-bit` go test (#412)

Introduce an option to configure `go-test` to allow completely skipping
`32-bit` tests.

Fixes #388

* Run at most 1 dispatch job per ref (#414)

* fix: check if git tag returns any results (#415)

* make go generate print the commands it executs (#440)

* use pull_request_target event for release-check workflow (#295)

* Revert "include cross-package coverage in codecov"

* Revert "Revert "include cross-package coverage in codecov""

* Make automerge a reusable workflow (#260)

* move automerge from template to workflows

* make automerge reusable and use it from new automerge template

* pass parent job name to reusable automerge

* check github actions yamls (#272)

* check github actions yamls

* make yaml linter happy about go-test

* mention VS Code YAML extension in the readme

* add info about other YAML checking extensions

* make yaml checker more generic

* use validate-yaml-schema action from mainline (#277)

* upgrade lewagon/wait-on-check-action to v1.1.1 (#278)

* always add a version.json file if it doesn't exist (#281)

* fix go-test runner string

* check if tag already exists in release-check (#287)

* allow specifying custom PATH for 386 arch (#289)

* use pull_request_target event for release-check workflow

* add comment on missing version.json

* chore: revert release checker path trigger change

* chore: add footnote when non-docs files are modified with the release

* fix: prev version calculation

* feat: allow configuring custom go-test runners (#443)

* feat: allow configuring custom go-test runners

* docs: update readme to include info on configuration variables

* feat: allow skipping go-test on certain OSes (#455)

* feat: standarise JSON config reading

* feat: allow skipping go-test on certain OSes

* fix: go-test conditional

* chore: show config after extracting it

* chore: udpate actions and go modules (#458)

* fix: source read-config from next for now

* simplify Go version upgrade procedure (#280)

* chore: simplify Go version upgrade procedure

* chore: add default for the go-version input of release-check

* Update .github/actions/copy-workflow-go/action.yml

* Update configs/README.md

Co-authored-by: Laurent Senta <[email protected]>

---------

Co-authored-by: Laurent Senta <[email protected]>

* Go through all the workflows and clean them up ahead of the next major release (#462)

* chore: clean up deprecated set-output

* chore: do not use substitution inside run

* chore: do not use substitution in if

* chore: skip env var brakets where possible

* fix: env var substitution

* fix: double toJSON

* Update templates/.github/workflows/js-test-and-release.yml

* feat: create gh releases in release-check/releaser workflows (#456)

* feat: create gh releases in release-check/releaser workflows

* fix: fill expr in release check workflow

* fix: add missing gh token in release check

* fix: add missing prev version env var in release check workflow

* fix: release check in release check

* chore: clean up obsolete step from releaser

* fix: step outputs in release workflows

* fix: labels in releaser

* fix: action gh release

* update go version to 1.20.x (#463)

* update go version to 1.20.x

* fix: go 1.20 upgrade

* Revert "fix: go 1.20 upgrade"

This reverts commit ceb72ef.

* clean up where source ref was set to next (#464)

* perform self-review before final release

---------

Co-authored-by: Masih H. Derkani <[email protected]>
Co-authored-by: Marten Seemann <[email protected]>
Co-authored-by: Laurent Senta <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

broken yaml stopped workflow execution
2 participants