2022-03-18 15:39:46 +00:00
|
|
|
name: Core CI Tests
|
|
|
|
on:
|
2023-01-04 19:34:23 +00:00
|
|
|
pull_request:
|
|
|
|
paths-ignore:
|
|
|
|
- 'README.md'
|
|
|
|
- 'CHANGELOG.md'
|
|
|
|
- '.changelog/**'
|
|
|
|
- '.tours/**'
|
|
|
|
- 'contributing/**'
|
|
|
|
- 'demo/**'
|
|
|
|
- 'dev/**'
|
|
|
|
- 'e2e/terraform/**'
|
|
|
|
- 'e2e/ui/**'
|
|
|
|
- 'integrations/**'
|
|
|
|
- 'pkg/**'
|
|
|
|
- 'scripts/**'
|
|
|
|
- 'terraform/**'
|
|
|
|
- 'ui/**'
|
|
|
|
- 'website/**'
|
2022-03-18 15:39:46 +00:00
|
|
|
push:
|
2023-01-04 19:34:23 +00:00
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
- release/**
|
2022-03-18 15:39:46 +00:00
|
|
|
paths-ignore:
|
|
|
|
- 'README.md'
|
|
|
|
- 'CHANGELOG.md'
|
2022-04-01 14:49:40 +00:00
|
|
|
- '.changelog/**'
|
|
|
|
- '.tours/**'
|
|
|
|
- 'contributing/**'
|
|
|
|
- 'demo/**'
|
|
|
|
- 'dev/**'
|
|
|
|
- 'e2e/terraform/**'
|
2022-09-16 14:58:06 +00:00
|
|
|
- 'e2e/ui/**'
|
2022-04-01 14:49:40 +00:00
|
|
|
- 'integrations/**'
|
|
|
|
- 'pkg/**'
|
|
|
|
- 'scripts/**'
|
|
|
|
- 'terraform/**'
|
|
|
|
- 'ui/**'
|
|
|
|
- 'website/**'
|
2023-01-04 19:34:23 +00:00
|
|
|
|
2022-03-18 15:39:46 +00:00
|
|
|
env:
|
2022-03-24 19:58:43 +00:00
|
|
|
VERBOSE: 1
|
2022-03-18 15:39:46 +00:00
|
|
|
GOTESTARCH: amd64
|
2023-01-31 16:00:27 +00:00
|
|
|
CONSUL_VERSION: 1.14.4
|
|
|
|
VAULT_VERSION: 1.12.2
|
2022-03-18 15:39:46 +00:00
|
|
|
NOMAD_SLOW_TEST: 0
|
2022-03-24 20:08:03 +00:00
|
|
|
NOMAD_TEST_LOG_LEVEL: OFF
|
2022-03-18 15:39:46 +00:00
|
|
|
jobs:
|
2022-10-21 22:38:45 +00:00
|
|
|
mods:
|
|
|
|
runs-on: ubuntu-22.04
|
|
|
|
timeout-minutes: 10
|
|
|
|
steps:
|
2023-05-17 14:38:10 +00:00
|
|
|
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
|
2022-11-17 13:50:45 +00:00
|
|
|
- uses: hashicorp/setup-golang@v1
|
|
|
|
- name: Get Go modules
|
2022-10-21 22:38:45 +00:00
|
|
|
run: |
|
|
|
|
make tidy
|
|
|
|
make bootstrap
|
2022-03-18 15:39:46 +00:00
|
|
|
checks:
|
2022-10-21 22:38:45 +00:00
|
|
|
needs: [mods]
|
2022-05-05 17:56:52 +00:00
|
|
|
runs-on: ubuntu-22.04
|
2022-03-18 15:39:46 +00:00
|
|
|
timeout-minutes: 10
|
|
|
|
steps:
|
2023-05-17 14:38:10 +00:00
|
|
|
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
|
2022-03-18 15:39:46 +00:00
|
|
|
with:
|
|
|
|
fetch-depth: 0 # needs tags for checkproto
|
2022-11-17 13:50:45 +00:00
|
|
|
- uses: hashicorp/setup-golang@v1
|
2022-03-18 15:39:46 +00:00
|
|
|
- name: Run make check
|
|
|
|
run: |
|
2022-03-19 21:29:32 +00:00
|
|
|
make missing
|
2022-03-18 15:39:46 +00:00
|
|
|
make bootstrap
|
|
|
|
make check
|
|
|
|
compile:
|
2022-10-27 14:02:58 +00:00
|
|
|
needs: [mods, checks]
|
2022-03-18 15:39:46 +00:00
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2022-05-05 17:56:52 +00:00
|
|
|
os: [ubuntu-22.04, macos-11, windows-2019]
|
2022-03-18 15:39:46 +00:00
|
|
|
runs-on: ${{matrix.os}}
|
|
|
|
timeout-minutes: 20
|
|
|
|
steps:
|
2023-05-17 14:38:10 +00:00
|
|
|
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
|
2022-11-17 13:50:45 +00:00
|
|
|
- uses: hashicorp/setup-golang@v1
|
2022-03-18 15:39:46 +00:00
|
|
|
- name: Run make dev
|
|
|
|
run: |
|
|
|
|
make bootstrap
|
|
|
|
make dev
|
|
|
|
tests-api:
|
2022-10-21 22:38:45 +00:00
|
|
|
needs: [mods]
|
2022-12-16 18:25:28 +00:00
|
|
|
runs-on: [custom, xl, 22.04]
|
2023-02-09 16:26:10 +00:00
|
|
|
timeout-minutes: 8
|
2022-03-18 15:39:46 +00:00
|
|
|
steps:
|
2023-05-17 14:38:10 +00:00
|
|
|
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
|
2022-11-17 13:50:45 +00:00
|
|
|
- uses: hashicorp/setup-golang@v1
|
2022-03-18 15:39:46 +00:00
|
|
|
- name: Run API tests
|
|
|
|
env:
|
|
|
|
GOTEST_MOD: api
|
|
|
|
run: |
|
|
|
|
make bootstrap
|
|
|
|
make generate-all
|
2022-03-29 00:33:01 +00:00
|
|
|
sudo sed -i 's!Defaults!#Defaults!g' /etc/sudoers
|
|
|
|
sudo -E env "PATH=$PATH" make test-nomad-module
|
2022-10-27 14:02:58 +00:00
|
|
|
tests-groups:
|
2022-10-21 22:38:45 +00:00
|
|
|
needs: [mods]
|
2022-05-05 17:56:52 +00:00
|
|
|
runs-on: ubuntu-22.04
|
2022-03-18 15:39:46 +00:00
|
|
|
timeout-minutes: 30
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2022-10-27 14:02:58 +00:00
|
|
|
groups:
|
|
|
|
- nomad
|
2022-03-18 15:39:46 +00:00
|
|
|
- client
|
|
|
|
- command
|
2022-10-27 14:02:58 +00:00
|
|
|
- drivers
|
|
|
|
- quick
|
2022-03-18 15:39:46 +00:00
|
|
|
steps:
|
2023-05-17 14:38:10 +00:00
|
|
|
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
|
2022-11-17 13:50:45 +00:00
|
|
|
- uses: hashicorp/setup-golang@v1
|
2022-03-18 15:39:46 +00:00
|
|
|
- name: Run Matrix Tests
|
|
|
|
env:
|
2022-10-27 14:02:58 +00:00
|
|
|
GOTEST_GROUP: ${{matrix.groups}}
|
2022-03-18 15:39:46 +00:00
|
|
|
run: |
|
|
|
|
make bootstrap
|
|
|
|
make generate-all
|
2022-10-27 14:02:58 +00:00
|
|
|
make dev
|
2022-11-17 13:50:45 +00:00
|
|
|
hc-install install -version ${{env.VAULT_VERSION}} -path ${{env.GOBIN}} vault
|
|
|
|
hc-install install -version ${{env.CONSUL_VERSION}} -path ${{env.GOBIN}} consul
|
2022-03-18 15:39:46 +00:00
|
|
|
sudo sed -i 's!Defaults!#Defaults!g' /etc/sudoers
|
|
|
|
sudo -E env "PATH=$PATH" make test-nomad
|
2023-06-02 19:35:55 +00:00
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
|