cicd: update go version #2591
Workflow file for this run
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
--- | |
name: CI | |
on: | |
push: | |
branches: | |
- main | |
- release-4.* | |
pull_request: | |
branches: | |
- main | |
- release-4.* | |
jobs: | |
lints: | |
name: Lints | |
runs-on: ubuntu-latest | |
steps: | |
- name: Commit Check | |
uses: gsactions/commit-message-checker@v2 | |
with: | |
pattern: | | |
^[^:!]+: .+\n\n.*$ | |
error: 'Commit must begin with <scope>: <subject>' | |
flags: 'gm' | |
excludeTitle: true | |
excludeDescription: true | |
checkAllCommitMessages: true | |
accessToken: ${{ secrets.GITHUB_TOKEN }} | |
- name: Checkout | |
id: checkout | |
if: ${{ !cancelled() }} | |
uses: actions/checkout@v4 | |
- name: Check Filenames | |
if: ${{ !cancelled() && steps.checkout.conclusion == 'success' }} | |
run: | # Check for all the characters Windows hates. | |
git ls-files -- ':/:*[<>:"|?*]*' | while read -r file; do | |
printf '::error file=%s,title=Bad Filename::Disallowed character in file name\n' "$file" | |
done | |
exit $(git ls-files -- ':/:*[<>:"|?*]*' | wc -l) | |
- name: Check API Reference | |
if: ${{ !cancelled() && steps.checkout.conclusion == 'success' }} | |
run: | | |
npx widdershins --search false --language_tabs 'python:Python' 'go:Golang' 'javascript:Javascript' --summary ./openapi.yaml -o ./Documentation/reference/api.md | |
git diff --exit-code | |
- name: Setup Go | |
id: 'setupgo' | |
if: ${{ !cancelled() && steps.checkout.conclusion == 'success' }} | |
uses: actions/setup-go@v5 | |
with: | |
cache: false | |
go-version-file: ./go.mod | |
- name: Go Tidy | |
if: ${{ !cancelled() && steps.checkout.conclusion == 'success' && steps.setupgo.conclusion == 'success' }} | |
run: | | |
trap 'echo "::error file=go.mod,title=Tidy Check::Commit would leave go.mod untidy"' ERR | |
go mod tidy | |
git diff --exit-code | |
documentation: | |
name: Documentation | |
needs: ['lints'] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/actions/documentation | |
with: | |
publish: false | |
tests: | |
name: Tests | |
needs: ['lints'] | |
uses: ./.github/workflows/tests.yml | |
with: | |
package_expr: ./... | |
qemu: false |