mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 02:15:43 +03:00
ci: use groups of tests in gha (#15018)
* [no ci] use json for grouping packages for testing * [no ci] able to get packages in group * [no ci] able to run groups of tests * [no ci] more * [no ci] try disable circle unit tests * ci: use actions/checkout@v3 * ci: rename to quick * ci: need make dev in mods cache step * ci: make compile step depend on checks step * ci: bump consul and vault versions * ci: need make dev for group tests * ci: update ci unit testing docs * docs: spell plumbing correctly Co-authored-by: Tim Gross <tgross@hashicorp.com> Co-authored-by: Tim Gross <tgross@hashicorp.com>
This commit is contained in:
70
.github/workflows/test-core.yaml
vendored
70
.github/workflows/test-core.yaml
vendored
@@ -25,8 +25,8 @@ env:
|
||||
GO_VERSION: 1.19.1
|
||||
GOBIN: /usr/local/bin
|
||||
GOTESTARCH: amd64
|
||||
CONSUL_VERSION: 1.11.3
|
||||
VAULT_VERSION: 1.9.3
|
||||
CONSUL_VERSION: 1.12.6
|
||||
VAULT_VERSION: 1.12.0
|
||||
NOMAD_SLOW_TEST: 0
|
||||
NOMAD_TEST_LOG_LEVEL: OFF
|
||||
jobs:
|
||||
@@ -48,7 +48,7 @@ jobs:
|
||||
runs-on: ubuntu-22.04
|
||||
timeout-minutes: 10
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0 # needs tags for checkproto
|
||||
- uses: magnetikonline/action-golang-cache@v1
|
||||
@@ -61,7 +61,7 @@ jobs:
|
||||
make bootstrap
|
||||
make check
|
||||
compile:
|
||||
needs: [mods]
|
||||
needs: [mods, checks]
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
@@ -69,7 +69,7 @@ jobs:
|
||||
runs-on: ${{matrix.os}}
|
||||
timeout-minutes: 20
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
- uses: magnetikonline/action-golang-cache@v1
|
||||
with:
|
||||
go-version: ${{env.GO_VERSION}}
|
||||
@@ -85,7 +85,7 @@ jobs:
|
||||
runs-on: ubuntu-22.04
|
||||
timeout-minutes: 30
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
- uses: magnetikonline/action-golang-cache@v1
|
||||
with:
|
||||
go-version: ${{env.GO_VERSION}}
|
||||
@@ -98,72 +98,34 @@ jobs:
|
||||
make generate-all
|
||||
sudo sed -i 's!Defaults!#Defaults!g' /etc/sudoers
|
||||
sudo -E env "PATH=$PATH" make test-nomad-module
|
||||
tests-pkgs:
|
||||
tests-groups:
|
||||
needs: [mods]
|
||||
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/...
|
||||
groups:
|
||||
- nomad
|
||||
- nomad/deploymentwatcher/...
|
||||
- nomad/drainer/...
|
||||
- nomad/state/...
|
||||
- nomad/stream/...
|
||||
- nomad/structs/...
|
||||
- nomad/volumewatcher/...
|
||||
- plugins/...
|
||||
- scheduler/...
|
||||
- testutil/...
|
||||
- client
|
||||
- command
|
||||
- drivers
|
||||
- quick
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
- uses: magnetikonline/action-golang-cache@v1
|
||||
with:
|
||||
go-version: ${{env.GO_VERSION}}
|
||||
cache-key-suffix: -core
|
||||
- name: Run Matrix Tests
|
||||
env:
|
||||
GOTEST_PKGS: ./${{matrix.pkg}}
|
||||
GOTEST_GROUP: ${{matrix.groups}}
|
||||
run: |
|
||||
make bootstrap
|
||||
make generate-all
|
||||
make dev
|
||||
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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user