diff options
author | Francis Lavoie <[email protected]> | 2022-04-13 16:03:38 -0400 |
---|---|---|
committer | GitHub <[email protected]> | 2022-04-13 14:03:38 -0600 |
commit | c3a82f53d558b44603a0b26fc256e6c011a11650 (patch) | |
tree | c7704cdfcdf87378068760a4905c3d6d58c3323c /.github | |
parent | 30b6d1f47a35d00fca7cff0daa2ff59a98c5a85e (diff) | |
download | caddy-c3a82f53d558b44603a0b26fc256e6c011a11650.tar.gz caddy-c3a82f53d558b44603a0b26fc256e6c011a11650.zip |
ci: Ensure we always check for latest version of Go (#4703)
* ci: Ensure we always check for latest version of Go
* Try to force 1.18.1, 1.17.9
* Use includes for the actual go semver
* Use `~` for semver here, apparently
* Try to make tests still run on 1.18.0 for Mac, for now
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/ci.yml | 18 | ||||
-rw-r--r-- | .github/workflows/cross-build.yml | 10 | ||||
-rw-r--r-- | .github/workflows/lint.yml | 3 | ||||
-rw-r--r-- | .github/workflows/release.yml | 10 |
4 files changed, 36 insertions, 5 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 424b5dd19..bc9e0a0c8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,10 +21,23 @@ jobs: os: [ ubuntu-latest, macos-latest, windows-latest ] go: [ '1.17', '1.18' ] + include: + # Set the minimum Go patch version for the given Go minor + # Usable via ${{ matrix.GO_SEMVER }} + - go: '1.17' + GO_SEMVER: '~1.17.9' + + - go: '1.18' + GO_SEMVER: '~1.18.1' + + # Go 1.18.1 isn't released yet for Mac as of Apr 13 2022 + - go: '1.18' + os: 'macos-latest' + GO_SEMVER: '1.18.0' + # Set some variables per OS, usable via ${{ matrix.VAR }} # CADDY_BIN_PATH: the path to the compiled Caddy binary, for artifact publishing # SUCCESS: the typical value for $? per OS (Windows/pwsh returns 'True') - include: - os: ubuntu-latest CADDY_BIN_PATH: ./cmd/caddy/caddy SUCCESS: 0 @@ -43,7 +56,8 @@ jobs: - name: Install Go uses: actions/setup-go@v3 with: - go-version: ${{ matrix.go }} + go-version: ${{ matrix.GO_SEMVER }} + check-latest: true - name: Checkout code uses: actions/checkout@v3 diff --git a/.github/workflows/cross-build.yml b/.github/workflows/cross-build.yml index 04c1d29af..3ac9548f5 100644 --- a/.github/workflows/cross-build.yml +++ b/.github/workflows/cross-build.yml @@ -17,13 +17,21 @@ jobs: matrix: goos: ['android', 'linux', 'solaris', 'illumos', 'dragonfly', 'freebsd', 'openbsd', 'plan9', 'windows', 'darwin', 'netbsd'] go: [ '1.18' ] + + include: + # Set the minimum Go patch version for the given Go minor + # Usable via ${{ matrix.GO_SEMVER }} + - go: '1.18' + GO_SEMVER: '~1.18.1' + runs-on: ubuntu-latest continue-on-error: true steps: - name: Install Go uses: actions/setup-go@v3 with: - go-version: ${{ matrix.go }} + go-version: ${{ matrix.GO_SEMVER }} + check-latest: true - name: Print Go version and environment id: vars diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 7376b9104..0aae61966 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -19,7 +19,8 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v3 with: - go-version: 1.17 + go-version: '~1.17.9' + check-latest: true - name: golangci-lint uses: golangci/golangci-lint-action@v3 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 68e231de9..6d0fe7c55 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,13 +12,21 @@ jobs: matrix: os: [ ubuntu-latest ] go: [ '1.18' ] + + include: + # Set the minimum Go patch version for the given Go minor + # Usable via ${{ matrix.GO_SEMVER }} + - go: '1.17' + GO_SEMVER: '~1.18.1' + runs-on: ${{ matrix.os }} steps: - name: Install Go uses: actions/setup-go@v3 with: - go-version: ${{ matrix.go }} + go-version: ${{ matrix.GO_SEMVER }} + check-latest: true - name: Checkout code uses: actions/checkout@v3 |