forked from open-cluster-management-io/clusteradm
-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (60 loc) · 1.56 KB
/
tests.yaml
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
# Copyright Contributors to the Open Cluster Management project
name: Go
on:
push:
branches: [ main, release-* ]
pull_request:
branches: [ main, release-* ]
env:
GO_VERSION: '1.22'
jobs:
verify:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VERSION }}
- name: verify
run: make verify
unit-test:
runs-on: ubuntu-latest
env:
GOPATH: /tmp/go
steps:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VERSION }}
- name: Create GOPATH src directory
run: mkdir -p $GOPATH/src/github.com/open-cluster-management
- name: Check out code
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Copy the code into the GOPATH
run: cp -r . $GOPATH/src/github.com/open-cluster-management/clusteradm
- name: Unit Tests
working-directory: ${{ env.GOPATH }}/src/github.com/open-cluster-management/clusteradm
run: make test
integration-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VERSION }}
- name: Integration Tests
run: make test-integration
e2e-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VERSION }}
- name: E2E Tests
run: make test-e2e