mirror of
https://github.com/lxc/incus.git
synced 2026-02-05 09:46:19 +01:00
github: Change Go releases in tests
Rather than harcoding our Go versions, just always test on: - stable (everything) - oldstable (static analysis and dir tests) - tip (static analysis and dir tests) Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
This commit is contained in:
57
.github/workflows/tests.yml
vendored
57
.github/workflows/tests.yml
vendored
@@ -17,6 +17,13 @@ jobs:
|
|||||||
code-tests:
|
code-tests:
|
||||||
name: Code
|
name: Code
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
go:
|
||||||
|
- oldstable
|
||||||
|
- stable
|
||||||
|
- tip
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@@ -30,23 +37,38 @@ jobs:
|
|||||||
uses: redhat-plumbers-in-action/differential-shellcheck@v5
|
uses: redhat-plumbers-in-action/differential-shellcheck@v5
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
if: github.event_name == 'pull_request'
|
if: github.event_name == 'pull_request' && matrix.go == 'stable'
|
||||||
|
|
||||||
- name: Upload artifact with ShellCheck defects in SARIF format
|
- name: Upload artifact with ShellCheck defects in SARIF format
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: Differential ShellCheck SARIF
|
name: Differential ShellCheck SARIF
|
||||||
path: ${{ steps.ShellCheck.outputs.sarif }}
|
path: ${{ steps.ShellCheck.outputs.sarif }}
|
||||||
if: github.event_name == 'pull_request'
|
if: github.event_name == 'pull_request' && matrix.go == 'stable'
|
||||||
|
|
||||||
- name: Install Go
|
- name: Install Go (${{ matrix.go }})
|
||||||
uses: actions/setup-go@v5
|
uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
go-version: 1.21.x
|
go-version: ${{ matrix.go }}
|
||||||
|
if: matrix.go != 'tip'
|
||||||
|
|
||||||
|
- name: Install Go (stable)
|
||||||
|
uses: actions/setup-go@v5
|
||||||
|
with:
|
||||||
|
go-version: stable
|
||||||
|
if: matrix.go == 'tip'
|
||||||
|
|
||||||
|
- name: Install Go (tip)
|
||||||
|
run: |
|
||||||
|
go install golang.org/dl/gotip@latest
|
||||||
|
gotip download
|
||||||
|
~/sdk/gotip/bin/go version
|
||||||
|
echo "PATH=$HOME/go/bin:$HOME/sdk/gotip/bin/:$PATH" >> $GITHUB_ENV
|
||||||
|
if: matrix.go == 'tip'
|
||||||
|
|
||||||
- name: Check compatible min Go version
|
- name: Check compatible min Go version
|
||||||
run: |
|
run: |
|
||||||
go mod tidy -go=1.21
|
go mod tidy
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
@@ -109,14 +131,23 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
go: ["1.21.x"]
|
go:
|
||||||
suite: ["cluster", "standalone"]
|
- stable
|
||||||
backend: ["dir", "btrfs", "lvm", "zfs", "ceph", "random"]
|
suite:
|
||||||
|
- cluster
|
||||||
|
- standalone
|
||||||
|
backend:
|
||||||
|
- dir
|
||||||
|
- btrfs
|
||||||
|
- lvm
|
||||||
|
- zfs
|
||||||
|
- ceph
|
||||||
|
- random
|
||||||
include:
|
include:
|
||||||
- go: stable
|
- go: oldstable
|
||||||
suite: cluster
|
suite: cluster
|
||||||
backend: dir
|
backend: dir
|
||||||
- go: stable
|
- go: oldstable
|
||||||
suite: standalone
|
suite: standalone
|
||||||
backend: dir
|
backend: dir
|
||||||
- go: tip
|
- go: tip
|
||||||
@@ -332,7 +363,8 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
go:
|
go:
|
||||||
- 1.21.x
|
- oldstable
|
||||||
|
- stable
|
||||||
os:
|
os:
|
||||||
- ubuntu-latest
|
- ubuntu-latest
|
||||||
- macos-latest
|
- macos-latest
|
||||||
@@ -398,6 +430,7 @@ jobs:
|
|||||||
run: go test -v ./shared/...
|
run: go test -v ./shared/...
|
||||||
|
|
||||||
- name: Upload incus client artifacts
|
- name: Upload incus client artifacts
|
||||||
|
if: matrix.go == 'stable'
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
with:
|
with:
|
||||||
@@ -414,7 +447,7 @@ jobs:
|
|||||||
- name: Install Go
|
- name: Install Go
|
||||||
uses: actions/setup-go@v5
|
uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
go-version: 1.21.x
|
go-version: stable
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
Reference in New Issue
Block a user