client_golang/.github/workflows/go.yml

62 lines
1.8 KiB
YAML
Raw Normal View History

---
name: Go
on:
pull_request:
push:
branches:
- main
- "release-*"
concurrency:
group: ${{ github.workflow }}-${{ (github.event.pull_request && github.event.pull_request.number) || github.ref || github.run_id }}
cancel-in-progress: true
# Minimal permissions to be inherited by any job that don't declare it's own permissions
permissions:
contents: read
jobs:
supportedVersions:
name: Fetch supported Go versions
runs-on: ubuntu-latest
outputs:
supported_versions: ${{ steps.matrix.outputs.supported_versions }}
steps:
- name: Checkout code
build(deps): bump the github-actions group across 1 directory with 3 updates Bumps the github-actions group with 3 updates in the / directory: [actions/checkout](https://github.com/actions/checkout), [github/codeql-action](https://github.com/github/codeql-action) and [dagger/dagger-for-github](https://github.com/dagger/dagger-for-github). Updates `actions/checkout` from 4.2.0 to 4.2.2 - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/d632683dd7b4114ad314bca15554477dd762a938...11bd71901bbe5b1630ceea73d27597364c9af683) Updates `github/codeql-action` from 3.26.10 to 3.27.0 - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/github/codeql-action/compare/e2b3eafc8d227b0241d48be5f425d47c2d750a13...662472033e021d55d94146f66f6058822b0b39fd) Updates `dagger/dagger-for-github` from 6.11.0 to 6.14.0 - [Release notes](https://github.com/dagger/dagger-for-github/releases) - [Commits](https://github.com/dagger/dagger-for-github/compare/fc945fa66fc7bfa72bc80f85b1a1ef4bd1d30cbb...ad6a4e308a42fb2cf9be8b060f9aba9d57d4c9aa) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions - dependency-name: github/codeql-action dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions - dependency-name: dagger/dagger-for-github dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions ... Signed-off-by: dependabot[bot] <support@github.com>
2024-11-08 11:42:37 +03:00
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Read supported_go_versions.txt
id: matrix
run: |
versions=$(cat supported_go_versions.txt)
matrix="[$(echo "$versions" | sed 's/\(.*\)/"\1"/' | paste -s -d,)]"
echo "supported_versions=$matrix" >> $GITHUB_OUTPUT
test:
name: Tests
runs-on: ubuntu-latest
needs: supportedVersions
strategy:
matrix:
go_version: ${{ fromJSON(needs.supportedVersions.outputs.supported_versions) }}
steps:
- name: Checkout code
build(deps): bump the github-actions group across 1 directory with 3 updates Bumps the github-actions group with 3 updates in the / directory: [actions/checkout](https://github.com/actions/checkout), [github/codeql-action](https://github.com/github/codeql-action) and [dagger/dagger-for-github](https://github.com/dagger/dagger-for-github). Updates `actions/checkout` from 4.2.0 to 4.2.2 - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/d632683dd7b4114ad314bca15554477dd762a938...11bd71901bbe5b1630ceea73d27597364c9af683) Updates `github/codeql-action` from 3.26.10 to 3.27.0 - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/github/codeql-action/compare/e2b3eafc8d227b0241d48be5f425d47c2d750a13...662472033e021d55d94146f66f6058822b0b39fd) Updates `dagger/dagger-for-github` from 6.11.0 to 6.14.0 - [Release notes](https://github.com/dagger/dagger-for-github/releases) - [Commits](https://github.com/dagger/dagger-for-github/compare/fc945fa66fc7bfa72bc80f85b1a1ef4bd1d30cbb...ad6a4e308a42fb2cf9be8b060f9aba9d57d4c9aa) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions - dependency-name: github/codeql-action dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions - dependency-name: dagger/dagger-for-github dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions ... Signed-off-by: dependabot[bot] <support@github.com>
2024-11-08 11:42:37 +03:00
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Run tests and check license
build(deps): bump the github-actions group across 1 directory with 3 updates Bumps the github-actions group with 3 updates in the / directory: [actions/checkout](https://github.com/actions/checkout), [github/codeql-action](https://github.com/github/codeql-action) and [dagger/dagger-for-github](https://github.com/dagger/dagger-for-github). Updates `actions/checkout` from 4.2.0 to 4.2.2 - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/d632683dd7b4114ad314bca15554477dd762a938...11bd71901bbe5b1630ceea73d27597364c9af683) Updates `github/codeql-action` from 3.26.10 to 3.27.0 - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/github/codeql-action/compare/e2b3eafc8d227b0241d48be5f425d47c2d750a13...662472033e021d55d94146f66f6058822b0b39fd) Updates `dagger/dagger-for-github` from 6.11.0 to 6.14.0 - [Release notes](https://github.com/dagger/dagger-for-github/releases) - [Commits](https://github.com/dagger/dagger-for-github/compare/fc945fa66fc7bfa72bc80f85b1a1ef4bd1d30cbb...ad6a4e308a42fb2cf9be8b060f9aba9d57d4c9aa) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions - dependency-name: github/codeql-action dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions - dependency-name: dagger/dagger-for-github dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions ... Signed-off-by: dependabot[bot] <support@github.com>
2024-11-08 11:42:37 +03:00
uses: dagger/dagger-for-github@ad6a4e308a42fb2cf9be8b060f9aba9d57d4c9aa # v6.14.0
with:
version: "latest"
verb: call
args: -vvv --src . make --go-version ${{matrix.go_version}} --args 'check_license test'
- name: Run style and unused
build(deps): bump the github-actions group across 1 directory with 3 updates Bumps the github-actions group with 3 updates in the / directory: [actions/checkout](https://github.com/actions/checkout), [github/codeql-action](https://github.com/github/codeql-action) and [dagger/dagger-for-github](https://github.com/dagger/dagger-for-github). Updates `actions/checkout` from 4.2.0 to 4.2.2 - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/d632683dd7b4114ad314bca15554477dd762a938...11bd71901bbe5b1630ceea73d27597364c9af683) Updates `github/codeql-action` from 3.26.10 to 3.27.0 - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/github/codeql-action/compare/e2b3eafc8d227b0241d48be5f425d47c2d750a13...662472033e021d55d94146f66f6058822b0b39fd) Updates `dagger/dagger-for-github` from 6.11.0 to 6.14.0 - [Release notes](https://github.com/dagger/dagger-for-github/releases) - [Commits](https://github.com/dagger/dagger-for-github/compare/fc945fa66fc7bfa72bc80f85b1a1ef4bd1d30cbb...ad6a4e308a42fb2cf9be8b060f9aba9d57d4c9aa) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions - dependency-name: github/codeql-action dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions - dependency-name: dagger/dagger-for-github dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions ... Signed-off-by: dependabot[bot] <support@github.com>
2024-11-08 11:42:37 +03:00
uses: dagger/dagger-for-github@ad6a4e308a42fb2cf9be8b060f9aba9d57d4c9aa # v6.14.0
if: ${{ matrix.go_version == '1.21' }}
with:
version: "latest"
verb: call
args: -vvv --src . make --args 'check_license test'