@ -59,19 +59,25 @@ jobs:
name : Setup outputs
run : ./.github/scripts/get_runner_classes.sh
get-go-version:
uses : ./.github/workflows/reusable-get-go-version.yml
check-go-mod:
needs:
- setup
- get-go-version
uses : ./.github/workflows/reusable-check-go-mod.yml
with:
runs-on : ${{ needs.setup.outputs.compute-small }}
repository-name : ${{ github.repository }}
go-version : ${{ needs.get-go-version.outputs.go-version }}
secrets:
elevated-github-token : ${{ secrets.ELEVATED_GITHUB_TOKEN }}
check-generated-protobuf:
needs:
- setup
- get-go-version
runs-on : ${{ fromJSON(needs.setup.outputs.compute-medium) }}
steps:
- uses : actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
@ -81,7 +87,7 @@ jobs:
run : git config --global url."https://${{ secrets.ELEVATED_GITHUB_TOKEN }}:@github.com".insteadOf "https://github.com"
- uses : actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1
with:
go-version-file : 'go.mod'
go-version : ${{ needs.get-go-version.outputs.go-version }}
- run : make proto-tools
name : Install protobuf
- run : make proto-format
@ -97,6 +103,7 @@ jobs:
check-codegen:
needs:
- setup
- get-go-version
runs-on : ${{ fromJSON(needs.setup.outputs.compute-large) }}
steps:
- uses : actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
@ -106,7 +113,7 @@ jobs:
run : git config --global url."https://${{ secrets.ELEVATED_GITHUB_TOKEN }}:@github.com".insteadOf "https://github.com"
- uses : actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1
with:
go-version-file : 'go.mod'
go-version : ${{ needs.get-go-version.outputs.go-version }}
- run : make --always-make codegen
- run : |
if ! git diff --exit-code; then
@ -117,6 +124,7 @@ jobs:
lint-enums:
needs:
- setup
- get-go-version
runs-on : ${{ fromJSON(needs.setup.outputs.compute-large) }}
steps:
- uses : actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
@ -126,12 +134,13 @@ jobs:
run : git config --global url."https://${{ secrets.ELEVATED_GITHUB_TOKEN }}:@github.com".insteadOf "https://github.com"
- uses : actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1
with:
go-version-file : 'go.mod'
go-version : ${{ needs.get-go-version.outputs.go-version }}
- run : go install github.com/reillywatson/enumcover/cmd/enumcover@master && enumcover ./...
lint-container-test-deps:
needs:
- setup
- get-go-version
runs-on : ${{ fromJSON(needs.setup.outputs.compute-small) }}
steps:
- uses : actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
@ -140,12 +149,13 @@ jobs:
run : git config --global url."https://${{ secrets.ELEVATED_GITHUB_TOKEN }}:@github.com".insteadOf "https://github.com"
- uses : actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1
with:
go-version-file : 'go.mod'
go-version : ${{ needs.get-go-version.outputs.go-version }}
- run : make lint-container-test-deps
lint-consul-retry:
needs:
- setup
- get-go-version
runs-on : ${{ fromJSON(needs.setup.outputs.compute-small) }}
steps:
- uses : actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
@ -155,27 +165,31 @@ jobs:
run : git config --global url."https://${{ secrets.ELEVATED_GITHUB_TOKEN }}:@github.com".insteadOf "https://github.com"
- uses : actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1
with:
go-version-file : 'go.mod'
go-version : ${{ needs.get-go-version.outputs.go-version }}
- run : make lint-consul-retry
lint:
needs:
- setup
- get-go-version
uses : ./.github/workflows/reusable-lint.yml
with:
runs-on : ${{ needs.setup.outputs.compute-large }}
repository-name : ${{ github.repository }}
go-version : ${{ needs.get-go-version.outputs.go-version }}
secrets:
elevated-github-token : ${{ secrets.ELEVATED_GITHUB_TOKEN }}
lint-32bit:
needs:
- setup
- get-go-version
uses : ./.github/workflows/reusable-lint.yml
with:
go-arch : "386"
runs-on : ${{ needs.setup.outputs.compute-large }}
repository-name : ${{ github.repository }}
go-version : ${{ needs.get-go-version.outputs.go-version }}
secrets:
elevated-github-token : ${{ secrets.ELEVATED_GITHUB_TOKEN }}
@ -183,10 +197,12 @@ jobs:
dev-build:
needs:
- setup
- get-go-version
uses : ./.github/workflows/reusable-dev-build.yml
with:
runs-on : ${{ needs.setup.outputs.compute-large }}
repository-name : ${{ github.repository }}
go-version : ${{ needs.get-go-version.outputs.go-version }}
secrets:
elevated-github-token : ${{ secrets.ELEVATED_GITHUB_TOKEN }}
@ -194,11 +210,13 @@ jobs:
# if: ${{ endsWith(github.repository, '-enterprise') }}
# needs:
# - setup
# - get-go-version
# uses: ./.github/workflows/reusable-dev-build.yml
# with:
# uploaded-binary-name: 'consul-bin-s390x'
# runs-on: ${{ needs.setup.outputs.compute-large }}
# go-arch: "s390x"
# go-version: ${{ needs.get-go-version.outputs.go-version }}
# repository-name: ${{ github.repository }}
# secrets:
# elevated-github-token: ${{ secrets.ELEVATED_GITHUB_TOKEN }}
@ -208,11 +226,13 @@ jobs:
# if: ${{ endsWith(github.repository, '-enterprise') }}
# needs:
# - setup
# - get-go-version
# uses: ./.github/workflows/reusable-dev-build.yml
# with:
# uploaded-binary-name: 'consul-bin-arm64'
# runs-on: ${{ needs.setup.outputs.compute-large }}
# go-arch: "arm64"
# go-version: ${{ needs.get-go-version.outputs.go-version }}
# repository-name: ${{ github.repository }}
# secrets:
# elevated-github-token: ${{ secrets.ELEVATED_GITHUB_TOKEN }}
@ -222,6 +242,7 @@ jobs:
# if: ${{ endsWith(github.repository, '-enterprise') }}
# needs:
# - setup
# - get-go-version
# - dev-build-arm64
# uses: ./.github/workflows/reusable-unit-split.yml
# with:
@ -230,6 +251,7 @@ jobs:
# runner-count: 12
# runs-on: "['self-hosted', 'ondemand', 'os=macos-arm', 'arm64']"
# go-test-flags: "${{ (github.ref_name != 'main' && !startsWith(github.ref_name, 'release/')) && '-short' || '' }}"
# go-version: ${{ needs.get-go-version.outputs.go-version }}
# repository-name: ${{ github.repository }}
# secrets:
# elevated-github-token: ${{ secrets.ELEVATED_GITHUB_TOKEN }}
@ -239,6 +261,7 @@ jobs:
go-test-ce:
needs:
- setup
- get-go-version
- dev-build
uses : ./.github/workflows/reusable-unit-split.yml
with:
@ -248,6 +271,7 @@ jobs:
repository-name : ${{ github.repository }}
go-tags : ""
go-test-flags : "${{ (github.ref_name != 'main' && !startsWith(github.ref_name, 'release/')) && '-short' || '' }}"
go-version : ${{ needs.get-go-version.outputs.go-version }}
permissions:
id-token: write # NOTE : this permission is explicitly required for Vault auth.
contents : read
@ -260,6 +284,7 @@ jobs:
if : ${{ endsWith(github.repository, '-enterprise') }}
needs:
- setup
- get-go-version
- dev-build
uses : ./.github/workflows/reusable-unit-split.yml
with:
@ -269,6 +294,7 @@ jobs:
repository-name : ${{ github.repository }}
go-tags : "${{ github.event.repository.name == 'consul-enterprise' && 'consulent consuldev' || '' }}"
go-test-flags : "${{ (github.ref_name != 'main' && !startsWith(github.ref_name, 'release/')) && '-short' || '' }}"
go-version : ${{ needs.get-go-version.outputs.go-version }}
permissions:
id-token: write # NOTE : this permission is explicitly required for Vault auth.
contents : read
@ -280,6 +306,7 @@ jobs:
go-test-race:
needs:
- setup
- get-go-version
- dev-build
uses : ./.github/workflows/reusable-unit.yml
with:
@ -289,6 +316,7 @@ jobs:
runs-on : ${{ needs.setup.outputs.compute-large }}
repository-name : ${{ github.repository }}
go-tags : "${{ github.event.repository.name == 'consul-enterprise' && 'consulent consuldev' || '' }}"
go-version : ${{ needs.get-go-version.outputs.go-version }}
permissions:
id-token: write # NOTE : this permission is explicitly required for Vault auth.
contents : read
@ -300,6 +328,7 @@ jobs:
go-test-32bit:
needs:
- setup
- get-go-version
- dev-build
uses : ./.github/workflows/reusable-unit.yml
with:
@ -309,6 +338,7 @@ jobs:
runs-on : ${{ needs.setup.outputs.compute-large }}
repository-name : ${{ github.repository }}
go-tags : "${{ github.event.repository.name == 'consul-enterprise' && 'consulent consuldev' || '' }}"
go-version : ${{ needs.get-go-version.outputs.go-version }}
permissions:
id-token: write # NOTE : this permission is explicitly required for Vault auth.
contents : read
@ -321,6 +351,7 @@ jobs:
# if: ${{ endsWith(github.repository, '-enterprise') }}
# needs:
# - setup
# - get-go-version
# - dev-build-s390x
# uses: ./.github/workflows/reusable-unit.yml
# with:
@ -330,6 +361,7 @@ jobs:
# runs-on: ${{ needs.setup.outputs.compute-large }}
# repository-name: ${{ github.repository }}
# go-tags: "${{ github.event.repository.name == 'consul-enterprise' && 'consulent consuldev' || '' }}"
# go-version: ${{ needs.get-go-version.outputs.go-version }}
# permissions:
# id-token: write # NOTE: this permission is explicitly required for Vault auth.
# contents: read
@ -341,6 +373,7 @@ jobs:
go-test-envoyextensions:
needs:
- setup
- get-go-version
- dev-build
uses : ./.github/workflows/reusable-unit.yml
with:
@ -348,6 +381,7 @@ jobs:
runs-on : ${{ needs.setup.outputs.compute-large }}
repository-name : ${{ github.repository }}
go-tags : "${{ github.event.repository.name == 'consul-enterprise' && 'consulent consuldev' || '' }}"
go-version : ${{ needs.get-go-version.outputs.go-version }}
permissions:
id-token: write # NOTE : this permission is explicitly required for Vault auth.
contents : read
@ -359,6 +393,7 @@ jobs:
go-test-troubleshoot:
needs:
- setup
- get-go-version
- dev-build
uses : ./.github/workflows/reusable-unit.yml
with:
@ -366,6 +401,7 @@ jobs:
runs-on : ${{ needs.setup.outputs.compute-large }}
repository-name : ${{ github.repository }}
go-tags : "${{ github.event.repository.name == 'consul-enterprise' && 'consulent consuldev' || '' }}"
go-version : ${{ needs.get-go-version.outputs.go-version }}
permissions:
id-token: write # NOTE : this permission is explicitly required for Vault auth.
contents : read