github.com/hernad/nomad@v1.6.112/.github/workflows/test-core.yaml (about) 1 name: Core CI Tests 2 on: 3 pull_request: 4 paths-ignore: 5 - 'README.md' 6 - 'CHANGELOG.md' 7 - '.changelog/**' 8 - '.tours/**' 9 - 'contributing/**' 10 - 'demo/**' 11 - 'dev/**' 12 - 'e2e/terraform/**' 13 - 'e2e/ui/**' 14 - 'integrations/**' 15 - 'pkg/**' 16 - 'scripts/**' 17 - 'terraform/**' 18 - 'ui/**' 19 - 'website/**' 20 push: 21 branches: 22 - main 23 - release/** 24 paths-ignore: 25 - 'README.md' 26 - 'CHANGELOG.md' 27 - '.changelog/**' 28 - '.tours/**' 29 - 'contributing/**' 30 - 'demo/**' 31 - 'dev/**' 32 - 'e2e/terraform/**' 33 - 'e2e/ui/**' 34 - 'integrations/**' 35 - 'pkg/**' 36 - 'scripts/**' 37 - 'terraform/**' 38 - 'ui/**' 39 - 'website/**' 40 41 env: 42 VERBOSE: 1 43 GOTESTARCH: amd64 44 CONSUL_VERSION: 1.14.4 45 VAULT_VERSION: 1.12.2 46 NOMAD_SLOW_TEST: 0 47 NOMAD_TEST_LOG_LEVEL: OFF 48 49 jobs: 50 # this caches dependencies for subsequent jobs, including private deps in enterprise 51 mods: 52 runs-on: ${{ endsWith(github.repository, '-enterprise') && fromJSON('["self-hosted", "ondemand", "linux"]') || 'ubuntu-22.04' }} 53 timeout-minutes: 10 54 steps: 55 - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 56 - uses: ./.github/actions/vault-secrets 57 with: 58 paths: |- 59 kv/data/github/hashicorp/nomad-enterprise/gha ELEVATED_GITHUB_TOKEN ; 60 - name: Git config token 61 if: endsWith(github.repository, '-enterprise') 62 run: git config --global url.'https://${{ env.ELEVATED_GITHUB_TOKEN }}@github.com'.insteadOf 'https://github.com' 63 - uses: hashicorp/setup-golang@v1 64 - name: Get Go modules 65 run: | 66 make tidy 67 make bootstrap 68 checks: 69 uses: ./.github/workflows/checks.yaml 70 needs: [mods] 71 compile: 72 needs: [mods, checks] 73 strategy: 74 fail-fast: false 75 matrix: 76 os: [ubuntu-22.04, macos-11, windows-2019] 77 runs-on: ${{matrix.os}} 78 timeout-minutes: 20 79 steps: 80 - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 81 - uses: hashicorp/setup-golang@v1 82 - name: Run make dev 83 run: | 84 make bootstrap 85 make dev 86 tests-api: 87 needs: [mods] 88 runs-on: [custom, xl, 22.04] 89 timeout-minutes: 8 90 steps: 91 - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 92 - uses: hashicorp/setup-golang@v1 93 - name: Run API tests 94 env: 95 GOTEST_MOD: api 96 run: | 97 make bootstrap 98 make generate-all 99 sudo sed -i 's!Defaults!#Defaults!g' /etc/sudoers 100 sudo -E env "PATH=$PATH" make test-nomad-module 101 tests-groups: 102 needs: [mods] 103 runs-on: ubuntu-22.04 104 timeout-minutes: 30 105 strategy: 106 fail-fast: false 107 matrix: 108 groups: 109 - nomad 110 - client 111 - command 112 - drivers 113 - quick 114 steps: 115 - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 116 - uses: hashicorp/setup-golang@v1 117 - name: Run Matrix Tests 118 env: 119 GOTEST_GROUP: ${{matrix.groups}} 120 run: | 121 make bootstrap 122 make generate-all 123 make dev 124 hc-install install -version ${{env.VAULT_VERSION}} -path ${{env.GOBIN}} vault 125 hc-install install -version ${{env.CONSUL_VERSION}} -path ${{env.GOBIN}} consul 126 sudo sed -i 's!Defaults!#Defaults!g' /etc/sudoers 127 sudo -E env "PATH=$PATH" make test-nomad 128 permissions: 129 contents: read 130 id-token: write