a3ff23608c
The `hc-install` tool we're using needed a patch for a specific bug, but that's since been merged. We definitely want to switch to using a standard release from that project once one is shipped with the CLI, but pinning to HEAD should keep us for now.
153 lines
4.1 KiB
YAML
153 lines
4.1 KiB
YAML
name: Core CI Tests
|
|
on:
|
|
push:
|
|
branches-ignore:
|
|
- 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
|
|
GO_VERSION: 1.19.1
|
|
GOBIN: /usr/local/bin
|
|
GOTESTARCH: amd64
|
|
CONSUL_VERSION: 1.11.3
|
|
VAULT_VERSION: 1.9.3
|
|
NOMAD_SLOW_TEST: 0
|
|
NOMAD_TEST_LOG_LEVEL: OFF
|
|
jobs:
|
|
checks:
|
|
runs-on: ubuntu-22.04
|
|
timeout-minutes: 10
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 0 # needs tags for checkproto
|
|
- uses: magnetikonline/action-golang-cache@v1
|
|
with:
|
|
go-version: ${{env.GO_VERSION}}
|
|
cache-key-suffix: -checks
|
|
- name: Run make check
|
|
run: |
|
|
make missing
|
|
make bootstrap
|
|
make check
|
|
compile:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [ubuntu-22.04, macos-11, windows-2019]
|
|
runs-on: ${{matrix.os}}
|
|
timeout-minutes: 20
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: magnetikonline/action-golang-cache@v1
|
|
with:
|
|
go-version: ${{env.GO_VERSION}}
|
|
cache-key-suffix: -compile
|
|
- name: Run make dev
|
|
env:
|
|
GOBIN: ${{env.GOROOT}}/bin # windows kludge
|
|
run: |
|
|
make bootstrap
|
|
make dev
|
|
tests-api:
|
|
runs-on: ubuntu-22.04
|
|
timeout-minutes: 30
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: magnetikonline/action-golang-cache@v1
|
|
with:
|
|
go-version: ${{env.GO_VERSION}}
|
|
cache-key-suffix: -api
|
|
- 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-pkgs:
|
|
runs-on: ubuntu-22.04
|
|
timeout-minutes: 30
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
pkg:
|
|
- acl/...
|
|
- client
|
|
- client/allocdir/...
|
|
- client/allochealth/...
|
|
- client/allocrunner/...
|
|
- client/allocwatcher/...
|
|
- client/config/...
|
|
- client/consul/...
|
|
- client/devicemanager/...
|
|
- client/dynamicplugins/...
|
|
- client/fingerprint/...
|
|
- client/interfaces/...
|
|
- client/lib/...
|
|
- client/logmon/...
|
|
- client/pluginmanager/...
|
|
- client/servers/...
|
|
- client/serviceregistration/...
|
|
- client/state/...
|
|
- client/stats/...
|
|
- client/structs/...
|
|
- client/taskenv/...
|
|
- command
|
|
- command/agent/...
|
|
- command/raft_tools/...
|
|
- drivers/docker/...
|
|
- drivers/exec/...
|
|
- drivers/java/...
|
|
- drivers/mock/...
|
|
- drivers/rawexec/...
|
|
- drivers/shared/...
|
|
- drivers/qemu/...
|
|
- helper/...
|
|
- internal/...
|
|
- jobspec/...
|
|
- lib/...
|
|
- nomad
|
|
- nomad/deploymentwatcher/...
|
|
- nomad/drainer/...
|
|
- nomad/state/...
|
|
- nomad/stream/...
|
|
- nomad/structs/...
|
|
- nomad/volumewatcher/...
|
|
- plugins/...
|
|
- scheduler/...
|
|
- testutil/...
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: magnetikonline/action-golang-cache@v1
|
|
with:
|
|
go-version: ${{env.GO_VERSION}}
|
|
cache-key-suffix: -pkgs
|
|
- name: Run Matrix Tests
|
|
env:
|
|
GOTEST_PKGS: ./${{matrix.pkg}}
|
|
run: |
|
|
make bootstrap
|
|
make generate-all
|
|
sudo hc-install install -version ${{env.VAULT_VERSION}} -path /usr/local/bin vault
|
|
sudo hc-install install -version ${{env.CONSUL_VERSION}} -path /usr/local/bin consul
|
|
sudo sed -i 's!Defaults!#Defaults!g' /etc/sudoers
|
|
sudo -E env "PATH=$PATH" make test-nomad
|