-
Notifications
You must be signed in to change notification settings - Fork 2k
126 lines (124 loc) · 3.44 KB
/
test-core.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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
name: Core CI Tests
on:
pull_request:
paths-ignore:
- 'README.md'
- 'CHANGELOG.md'
- '.changelog/**'
- '.tours/**'
- 'contributing/**'
- 'demo/**'
- 'dev/**'
- 'e2e/terraform/**'
- 'e2e/ui/**'
- 'integrations/**'
- 'pkg/**'
- 'scripts/**'
- 'terraform/**'
- 'ui/**'
- 'website/**'
push:
branches:
- main
- release/**
paths-ignore:
- 'README.md'
- 'CHANGELOG.md'
- '.changelog/**'
- '.tours/**'
- 'contributing/**'
- 'demo/**'
- 'dev/**'
- 'e2e/terraform/**'
- 'e2e/ui/**'
- 'integrations/**'
- 'pkg/**'
- 'scripts/**'
- 'terraform/**'
- 'ui/**'
- 'website/**'
env:
VERBOSE: 1
GOTESTARCH: amd64
CONSUL_VERSION: 1.14.4
VAULT_VERSION: 1.12.2
NOMAD_SLOW_TEST: 0
NOMAD_TEST_LOG_LEVEL: OFF
jobs:
checks:
uses: ./.github/workflows/checks.yaml
compile:
needs: [checks]
strategy:
fail-fast: false
matrix:
os: [ubuntu-24.04, macos-14, windows-2019]
runs-on: ${{matrix.os}}
timeout-minutes: 20
steps:
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
cache: ${{ contains(runner.name, 'Github Actions') }}
go-version-file: .go-version
cache-dependency-path: '**/go.sum'
- name: Run make dev
run: |
make bootstrap
make dev
tests-api:
needs: [checks]
runs-on: custom-linux-xl-nomad-22.04
timeout-minutes: 8
steps:
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
cache: true
go-version-file: .go-version
cache-dependency-path: '**/go.sum'
- name: Run API tests
env:
GOTEST_MOD: api
run: |
make bootstrap
make generate-all
sudo sed -i 's!Defaults!#Defaults!g' /etc/sudoers
sudo -E env "PATH=$PATH" make test-nomad-module
tests-groups:
needs: [checks]
runs-on: ubuntu-22.04
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
groups:
- nomad
- client
- command
- drivers
- quick
steps:
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
cache: ${{ contains(runner.name, 'Github Actions') }}
go-version-file: .go-version
cache-dependency-path: '**/go.sum'
- name: Install optional dependencies
if: ${{ matrix.groups == 'drivers' }}
run: sudo apt update && sudo apt install qemu-system
- name: Run Matrix Tests
env:
GOTEST_GROUP: ${{matrix.groups}}
run: |
make bootstrap
make generate-all
make dev
sudo -E env "PATH=$PATH" hc-install install -version ${{env.VAULT_VERSION}} -path '${{env.GOPATH}}/bin' vault
sudo -E env "PATH=$PATH" hc-install install -version ${{env.CONSUL_VERSION}} -path '${{env.GOPATH}}/bin' consul
sudo sed -i 's!Defaults!#Defaults!g' /etc/sudoers
sudo -E env "PATH=$PATH" make test-nomad
permissions:
contents: read
id-token: write