ci: switch to 22.04 LTS for GHA Core CI tests
This commit is contained in:
parent
20b6bf3c22
commit
626a345fb2
|
@ -30,7 +30,7 @@ env:
|
||||||
NOMAD_TEST_LOG_LEVEL: OFF
|
NOMAD_TEST_LOG_LEVEL: OFF
|
||||||
jobs:
|
jobs:
|
||||||
checks:
|
checks:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-22.04
|
||||||
timeout-minutes: 10
|
timeout-minutes: 10
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
@ -49,7 +49,7 @@ jobs:
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-20.04, macos-11, windows-2019]
|
os: [ubuntu-22.04, macos-11, windows-2019]
|
||||||
runs-on: ${{matrix.os}}
|
runs-on: ${{matrix.os}}
|
||||||
timeout-minutes: 20
|
timeout-minutes: 20
|
||||||
steps:
|
steps:
|
||||||
|
@ -65,7 +65,7 @@ jobs:
|
||||||
make bootstrap
|
make bootstrap
|
||||||
make dev
|
make dev
|
||||||
tests-api:
|
tests-api:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-22.04
|
||||||
timeout-minutes: 30
|
timeout-minutes: 30
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
@ -82,7 +82,7 @@ jobs:
|
||||||
sudo sed -i 's!Defaults!#Defaults!g' /etc/sudoers
|
sudo sed -i 's!Defaults!#Defaults!g' /etc/sudoers
|
||||||
sudo -E env "PATH=$PATH" make test-nomad-module
|
sudo -E env "PATH=$PATH" make test-nomad-module
|
||||||
tests-pkgs:
|
tests-pkgs:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-22.04
|
||||||
timeout-minutes: 30
|
timeout-minutes: 30
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
|
|
|
@ -10,6 +10,7 @@ import (
|
||||||
|
|
||||||
"github.com/hashicorp/nomad/api"
|
"github.com/hashicorp/nomad/api"
|
||||||
"github.com/hashicorp/nomad/ci"
|
"github.com/hashicorp/nomad/ci"
|
||||||
|
"github.com/hashicorp/nomad/client/testutil"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -37,6 +38,8 @@ func TestIntegration_Command_NomadInit(t *testing.T) {
|
||||||
|
|
||||||
func TestIntegration_Command_RoundTripJob(t *testing.T) {
|
func TestIntegration_Command_RoundTripJob(t *testing.T) {
|
||||||
ci.Parallel(t)
|
ci.Parallel(t)
|
||||||
|
testutil.DockerCompatible(t)
|
||||||
|
|
||||||
assert := assert.New(t)
|
assert := assert.New(t)
|
||||||
tmpDir := t.TempDir()
|
tmpDir := t.TempDir()
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,6 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
"os/exec"
|
"os/exec"
|
||||||
"strings"
|
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
@ -176,9 +175,8 @@ func TestConsulConfig_Exec(t *testing.T) {
|
||||||
func TestConsulConfig_IpTemplateParse(t *testing.T) {
|
func TestConsulConfig_IpTemplateParse(t *testing.T) {
|
||||||
ci.Parallel(t)
|
ci.Parallel(t)
|
||||||
|
|
||||||
privateIps, err := sockaddr.GetPrivateIP()
|
privateIp, err := sockaddr.GetPrivateIP()
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
privateIp := strings.Split(privateIps, " ")[0]
|
|
||||||
|
|
||||||
testCases := []struct {
|
testCases := []struct {
|
||||||
name string
|
name string
|
||||||
|
@ -188,7 +186,7 @@ func TestConsulConfig_IpTemplateParse(t *testing.T) {
|
||||||
}{
|
}{
|
||||||
{name: "string address keeps working", tmpl: "10.0.1.0:8500", expectedOut: "10.0.1.0:8500", expectErr: false},
|
{name: "string address keeps working", tmpl: "10.0.1.0:8500", expectedOut: "10.0.1.0:8500", expectErr: false},
|
||||||
{name: "single ip sock-addr template", tmpl: "{{ GetPrivateIP }}:8500", expectedOut: privateIp + ":8500", expectErr: false},
|
{name: "single ip sock-addr template", tmpl: "{{ GetPrivateIP }}:8500", expectedOut: privateIp + ":8500", expectErr: false},
|
||||||
{name: "multi ip sock-addr template", tmpl: "{{ GetPrivateIPs }}:8500", expectedOut: "", expectErr: true},
|
{name: "multi ip sock-addr template", tmpl: "10.0.1.0 10.0.1.1:8500", expectedOut: "", expectErr: true},
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, tc := range testCases {
|
for _, tc := range testCases {
|
||||||
|
|
Loading…
Reference in New Issue