chore: Use gh-actions/actions/persistent-stores #13
Workflow file for this run
This file contains hidden or 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: Build and Test SDK | |
on: | |
push: | |
branches: [ 'v3', 'feat/**' ] | |
paths-ignore: | |
- '**.md' # Don't run CI on markdown changes. | |
pull_request: | |
branches: [ 'v3', 'feat/**' ] | |
paths-ignore: | |
- '**.md' | |
jobs: | |
go-versions: | |
uses: ./.github/workflows/go-versions.yml | |
# Runs the common tasks (unit tests, lint, contract tests) for each Go version. | |
test-linux: | |
name: ${{ format('Linux, Go {0}', matrix.go-version) }} | |
needs: go-versions | |
strategy: | |
# Let jobs fail independently, in case it's a single version that's broken. | |
fail-fast: false | |
matrix: | |
go-version: ${{ fromJSON(needs.go-versions.outputs.matrix) }} | |
uses: ./.github/workflows/common_ci.yml | |
with: | |
go-version: ${{ matrix.go-version }} | |
test-windows: | |
name: ${{ format('Windows, Go {0}', matrix.go-version) }} | |
runs-on: windows-2022 | |
needs: go-versions | |
strategy: | |
fail-fast: false | |
matrix: | |
go-version: ${{ fromJSON(needs.go-versions.outputs.matrix) }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Go ${{ matrix.go-version }} | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ matrix.go-version }} | |
- name: setup Consul | |
run: | | |
$ProgressPreference = "SilentlyContinue" | |
iwr -outf consul.zip https://releases.hashicorp.com/consul/1.4.2/consul_1.4.2_windows_amd64.zip | |
mkdir consul | |
Expand-Archive -Path consul.zip -DestinationPath consul | |
cd consul | |
sc.exe create "Consul" binPath="$(Get-Location)/consul.exe agent -dev" | |
sc.exe start "Consul" | |
- name: Test | |
run: go test -race ./... |