summaryrefslogtreecommitdiff
path: root/.github/workflows/ci.yml
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows/ci.yml')
-rw-r--r--.github/workflows/ci.yml53
1 files changed, 21 insertions, 32 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index ba07419..ed83744 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -18,17 +18,22 @@ jobs:
# Default is true, cancels jobs for other platforms in the matrix if one fails
fail-fast: false
matrix:
- os: [ ubuntu-latest, macos-latest, windows-latest ]
- go: [ '1.18', '1.20' ]
+ os:
+ - ubuntu-latest
+ - macos-latest
+ - windows-latest
+ go:
+ - '1.20'
+ - '1.21'
include:
# Set the minimum Go patch version for the given Go minor
# Usable via ${{ matrix.GO_SEMVER }}
- - go: '1.18'
- GO_SEMVER: '~1.18.4'
-
- go: '1.20'
- GO_SEMVER: '~1.20.0'
+ GO_SEMVER: '~1.20.6'
+
+ - go: '1.21'
+ GO_SEMVER: '~1.21.0'
# Set some variables per OS, usable via ${{ matrix.VAR }}
# CADDY_BIN_PATH: the path to the compiled Caddy binary, for artifact publishing
@@ -48,15 +53,15 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
+ - name: Checkout code
+ uses: actions/checkout@v4
+
- name: Install Go
- uses: actions/setup-go@v3
+ uses: actions/setup-go@v4
with:
go-version: ${{ matrix.GO_SEMVER }}
check-latest: true
- - name: Checkout code
- uses: actions/checkout@v3
-
# These tools would be useful if we later decide to reinvestigate
# publishing test/coverage reports to some tool for easier consumption
# - name: Install test and coverage analysis tools
@@ -68,6 +73,7 @@ jobs:
- name: Print Go version and environment
id: vars
+ shell: bash
run: |
printf "Using go at: $(which go)\n"
printf "Go version: $(go version)\n"
@@ -79,23 +85,6 @@ jobs:
# Calculate the short SHA1 hash of the git commit
echo "short_sha=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- - name: Cache the build cache
- uses: actions/cache@v3
- with:
- # In order:
- # * Module download cache
- # * Build cache (Linux)
- # * Build cache (Mac)
- # * Build cache (Windows)
- path: |
- ~/go/pkg/mod
- ~/.cache/go-build
- ~/Library/Caches/go-build
- ~\AppData\Local\go-build
- key: ${{ runner.os }}-${{ matrix.go }}-go-ci-${{ hashFiles('**/go.sum') }}
- restore-keys: |
- ${{ runner.os }}-${{ matrix.go }}-go-ci
-
- name: Get dependencies
run: |
go get -v -t -d ./...
@@ -146,8 +135,8 @@ jobs:
if: github.event.pull_request.head.repo.full_name == github.repository && github.actor != 'dependabot[bot]'
continue-on-error: true # August 2020: s390x VM is down due to weather and power issues
steps:
- - name: Checkout code into the Go module directory
- uses: actions/checkout@v3
+ - name: Checkout code
+ uses: actions/checkout@v4
- name: Run Tests
run: |
mkdir -p ~/.ssh && echo -e "${SSH_KEY//_/\\n}" > ~/.ssh/id_ecdsa && chmod og-rwx ~/.ssh/id_ecdsa
@@ -172,10 +161,10 @@ jobs:
goreleaser-check:
runs-on: ubuntu-latest
steps:
- - name: checkout
- uses: actions/checkout@v3
+ - name: Checkout code
+ uses: actions/checkout@v4
- - uses: goreleaser/goreleaser-action@v4
+ - uses: goreleaser/goreleaser-action@v5
with:
version: latest
args: check