-
Notifications
You must be signed in to change notification settings - Fork 614
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: apostasie <[email protected]>
- Loading branch information
Showing
11 changed files
with
126 additions
and
113 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
name: lint | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- 'release/**' | ||
pull_request: | ||
|
||
env: | ||
GO_VERSION: 1.23.x | ||
|
||
jobs: | ||
go: | ||
timeout-minutes: 5 | ||
name: go ${{ matrix.goos }} ${{ matrix.gonext }} | ||
runs-on: "${{ matrix.os }}" | ||
strategy: | ||
matrix: | ||
include: | ||
- os: ubuntu-24.04 | ||
goos: linux | ||
- os: ubuntu-24.04 | ||
goos: freebsd | ||
# FIXME: this is currently failing in a non-sensical way, so, running on linux instead... | ||
# - os: windows-2022 | ||
- os: ubuntu-24.04 | ||
goos: windows | ||
- os: ubuntu-24.04 | ||
goos: linux | ||
# This allows the canary script to select any upcoming golang alpha/beta/RC | ||
gonext: next | ||
- os: ubuntu-24.04 | ||
goos: freebsd | ||
gonext: next | ||
- os: ubuntu-24.04 | ||
goos: windows | ||
gonext: next | ||
env: | ||
GOOS: "${{ matrix.goos }}" | ||
steps: | ||
- uses: actions/[email protected] | ||
with: | ||
fetch-depth: 1 | ||
- name: Set GO env | ||
run: | | ||
# If gonext is specified, get the latest available golang pre-release instead of the major version | ||
if [ "$gonext" != "" ]; then | ||
. ./hack/build-integration-canary.sh | ||
canary::golang::latest | ||
fi | ||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version: ${{ env.GO_VERSION }} | ||
check-latest: true | ||
cache: true | ||
- name: golangci-lint | ||
uses: golangci/golangci-lint-action@v6 | ||
with: | ||
args: --verbose | ||
|
||
other: | ||
timeout-minutes: 5 | ||
name: yaml, shell, import order | ||
runs-on: ubuntu-24.04 | ||
steps: | ||
- uses: actions/[email protected] | ||
with: | ||
fetch-depth: 1 | ||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version: ${{ env.GO_VERSION }} | ||
check-latest: true | ||
cache: true | ||
- name: yaml | ||
run: make lint-yaml | ||
- name: shell | ||
run: make lint-shell | ||
- name: go imports ordering | ||
run: | | ||
go install -v github.com/incu6us/goimports-reviser/v3@latest | ||
make lint-imports |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,27 +15,6 @@ env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
jobs: | ||
lint: | ||
runs-on: "ubuntu-24.04" | ||
timeout-minutes: 20 | ||
steps: | ||
- uses: actions/[email protected] | ||
with: | ||
fetch-depth: 1 | ||
- name: Set GO env | ||
run: | | ||
. ./hack/build-integration-canary.sh | ||
canary::golang::latest | ||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version: ${{ env.GO_VERSION }} | ||
check-latest: true | ||
cache: true | ||
- name: golangci-lint | ||
uses: golangci/[email protected] | ||
with: | ||
args: --verbose | ||
|
||
linux: | ||
runs-on: "ubuntu-24.04" | ||
timeout-minutes: 40 | ||
|
@@ -66,10 +45,12 @@ jobs: | |
run: go test -v ./pkg/... | ||
- name: "Run integration tests" | ||
run: docker run -t --rm --privileged test-integration ./hack/test-integration.sh | ||
- name: "Run integration tests (flaky)" | ||
run: docker run -t --rm --privileged test-integration ./hack/test-integration.sh -test.only-flaky | ||
|
||
windows: | ||
runs-on: windows-latest | ||
timeout-minutes: 30 | ||
runs-on: windows-latest | ||
defaults: | ||
run: | ||
shell: bash | ||
|
@@ -95,6 +76,7 @@ jobs: | |
cache: true | ||
check-latest: true | ||
- run: go install ./cmd/nerdctl | ||
- run: go install -v gotest.tools/gotestsum@v1 | ||
# This here is solely to get the cni install script, which has not been modified in 3+ years. | ||
# There is little to no reason to update this to latest containerd | ||
- uses: actions/[email protected] | ||
|
@@ -112,5 +94,6 @@ jobs: | |
ctrdVersion: ${{ env.CONTAINERD_VERSION }} | ||
run: powershell hack/configure-windows-ci.ps1 | ||
- name: "Run integration tests" | ||
# See https://github.com/containerd/nerdctl/blob/main/docs/testing/README.md#about-parallelization | ||
run: go test -p 1 -v ./cmd/nerdctl/... | ||
run: ./hack/test-integration.sh | ||
- name: "Run integration tests (flaky)" | ||
run: ./hack/test-integration.sh -test.only-flaky |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,13 +10,12 @@ on: | |
paths-ignore: | ||
- '**.md' | ||
|
||
env: | ||
ROOTFUL: true | ||
|
||
jobs: | ||
linux: | ||
runs-on: "ubuntu-24.04" | ||
timeout-minutes: 40 | ||
env: | ||
ROOTFUL: true | ||
steps: | ||
- uses: actions/[email protected] | ||
with: | ||
|
This file contains 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
This file contains 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
Oops, something went wrong.