-
Notifications
You must be signed in to change notification settings - Fork 29
75 lines (61 loc) · 1.58 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
name: CI
on:
pull_request:
branches:
- main
permissions:
contents: read
jobs:
run-test:
timeout-minutes: 15
runs-on: ubuntu-latest
steps:
- name: Checkout Source
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568
with:
go-version: 1.22
check-latest: true
- name: Build and Test
run: |
go mod tidy
go build
go test -v ./...
env:
VET_E2E: true
# Used to avoid rate limiting issue while running
# test suites that use GitHub API
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run-e2e:
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- name: Checkout Source
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568
with:
go-version: 1.22
check-latest: true
- name: Build vet
run: |
go mod tidy
go build
- name: Run E2E Scenarios
run: |
./test/scenarios/all.sh
build-container:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout Source
uses: actions/checkout@v3
- name: Setup QEMU
uses: docker/setup-qemu-action@v2
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build Container Image
run: |
docker buildx build --platform linux/amd64 --platform linux/arm64 \
-t build-container-test .