Skip to content

Commit 2160df1

Browse files
ci: add containerd testing matrix (runfinch#114)
* ci: add containerd testing matrix * ci: add job timeouts --------- Signed-off-by: Austin Vazquez <[email protected]>
1 parent 682d4cd commit 2160df1

File tree

2 files changed

+34
-10
lines changed

2 files changed

+34
-10
lines changed

.github/workflows/ci.yaml

Lines changed: 34 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ env:
1717
jobs:
1818
git-secrets:
1919
runs-on: ubuntu-latest
20+
timeout-minutes: 5
2021
steps:
2122
- name: Pull latest awslabs/git-secrets repo
2223
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
@@ -34,10 +35,11 @@ jobs:
3435
git secrets --register-aws
3536
git secrets --scan-history
3637
lint:
38+
runs-on: ubuntu-latest
3739
strategy:
3840
matrix:
3941
working_dir: ['.']
40-
runs-on: ubuntu-latest
42+
timeout-minutes: 10
4143
steps:
4244
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
4345
- uses: golangci/golangci-lint-action@v6 # v6.1.0
@@ -51,31 +53,54 @@ jobs:
5153
steps:
5254
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
5355
- run: yamllint .
54-
unit-test:
56+
build:
5557
runs-on: ubuntu-latest
58+
timeout-minutes: 10
5659
steps:
5760
- uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0
5861
with:
5962
go-version: ${{ env.GO_VERSION }}
60-
cache: false
6163
- name: Checkout finch-deamon repo
6264
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
63-
- name: Build and run unit tests
64-
run: |
65-
make build
66-
make test-unit
65+
- name: Build the daemon
66+
run: make build
67+
- name: Run unit tests
68+
run: make test-unit
69+
- name: Create build artifacts
70+
run: tar -cvf build-artifacts.tar bin/
71+
- name: Upload build artifacts
72+
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
73+
with:
74+
name: build-artifacts
75+
path: build-artifacts.tar
6776
e2e-test:
6877
runs-on: ubuntu-latest
78+
needs: [build]
79+
strategy:
80+
matrix:
81+
containerd: ["1.7.22", "2.0.0"]
82+
fail-fast: false
83+
timeout-minutes: 10
84+
env:
85+
CONTAINERD_VERSION: ${{ matrix.containerd }}
6986
steps:
7087
- uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0
7188
with:
7289
go-version: ${{ env.GO_VERSION }}
7390
- name: Checkout finch-daemon repo
7491
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
92+
- name: Stop pre-existing containerd and docker services
93+
run: |
94+
sudo systemctl stop docker
95+
sudo systemctl stop containerd
7596
- name: Install Dependencies for e2e Testing
7697
run: ./setup-test-env.sh
77-
- name: Build the daemon
78-
run: make build
98+
- name: Download build artifacts
99+
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
100+
with:
101+
name: build-artifacts
102+
- name: Extract build artifacts
103+
run: tar -xvf build-artifacts.tar
79104
- name: Remove default podman network config
80105
run: |
81106
sudo ls /etc/cni/net.d

setup-test-env.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#!/bin/bash
22
# Set versions
3-
CONTAINERD_VERSION=1.7.22
43
RUNC_VERSION=1.1.14
54
NERDCTL_VERSION=1.7.6
65
BUILDKIT_VERSION=0.15.2

0 commit comments

Comments
 (0)