ci: Tweaks for multi go version tests (#3673)

This commit is contained in:
Francis Lavoie
2020-08-20 22:40:26 -04:00
committed by GitHub
parent 997ef522bc
commit ecbc1f85c5
4 changed files with 26 additions and 22 deletions
+7 -7
View File
@@ -17,7 +17,7 @@ jobs:
fail-fast: false
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
go-version: [ 1.14.x, 1.15.x ]
go: [ '1.14', '1.15' ]
# Set some variables per OS, usable via ${{ matrix.VAR }}
# CADDY_BIN_PATH: the path to the compiled Caddy binary, for artifact publishing
@@ -41,7 +41,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
go-version: ${{ matrix.go }}
- name: Checkout code
uses: actions/checkout@v2
@@ -69,12 +69,12 @@ jobs:
echo "::set-output name=go_cache::$(go env GOCACHE)"
- name: Cache the build cache
uses: actions/cache@v1
uses: actions/cache@v2
with:
path: ${{ steps.vars.outputs.go_cache }}
key: ${{ runner.os }}-go-ci-${{ hashFiles('**/go.sum') }}
key: ${{ runner.os }}-${{ matrix.go }}-go-ci-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-ci
${{ runner.os }}-${{ matrix.go }}-go-ci
- name: Get dependencies
run: |
@@ -91,7 +91,7 @@ jobs:
- name: Publish Build Artifact
uses: actions/upload-artifact@v1
with:
name: caddy_v2_${{ runner.os }}_${{ steps.vars.outputs.short_sha }}
name: caddy_${{ runner.os }}_go${{ matrix.go }}_${{ steps.vars.outputs.short_sha }}
path: ${{ matrix.CADDY_BIN_PATH }}
# Commented bits below were useful to allow the job to continue
@@ -167,7 +167,7 @@ jobs:
steps:
- name: checkout
uses: actions/checkout@v2
- uses: goreleaser/goreleaser-action@v1
- uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: check