Skip to content

Commit

Permalink
Merge pull request #572 from hmlanigan/runners
Browse files Browse the repository at this point in the history
#572

## Description 

Try using the Canonical self-hosted runners available. The juju runners required setup which was never changed as they were running noble.

While using the runners, a new error appeared in TestProviderConfigureAddresses where the wording of the error changed. Updated the test to handle both cases. 

## Additional Information

JUJU-6829
  • Loading branch information
jujubot authored Oct 1, 2024
2 parents b5f0b18 + cab734e commit 5924142
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 18 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
# Ensure project builds before running testing matrix
go-install:
name: install
runs-on: ubuntu-latest
runs-on: [self-hosted, jammy]
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
Expand All @@ -34,13 +34,17 @@ jobs:

# Ensure the generated docs are up todate
generate:
runs-on: ubuntu-latest
runs-on: [self-hosted, jammy]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: "go.mod"
cache: true
- uses: hashicorp/setup-terraform@v3
with:
terraform_version: "1.9.*"
terraform_wrapper: false
- run: go generate ./...
- name: git diff
run: |
Expand All @@ -49,7 +53,7 @@ jobs:
# Ensure the go code is formatted properly
format:
runs-on: ubuntu-latest
runs-on: [self-hosted, jammy]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
Expand All @@ -66,7 +70,7 @@ jobs:
# This runs golangci-lint against the codebase
lint:
name: golangci-lint
runs-on: ubuntu-latest
runs-on: [self-hosted, jammy]
steps:
- uses: actions/checkout@v4
- name: Determine which tests to run
Expand All @@ -90,7 +94,7 @@ jobs:
# This runs golangci-lint against the codebase
copyright-check:
name: copyright-check
runs-on: ubuntu-latest
runs-on: [self-hosted, jammy]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/canary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
# Ensure project builds before running testing matrix
build:
name: Build
runs-on: ubuntu-latest
runs-on: [self-hosted, jammy]
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
Expand All @@ -29,7 +29,7 @@ jobs:
name: Terraform Provider Acceptance Tests
needs:
- build
runs-on: ubuntu-latest
runs-on: [self-hosted, jammy]
timeout-minutes: 60
strategy:
fail-fast: false
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cla.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
cla-check:
permissions:
pull-requests: write # for canonical/has-signed-canonical-cla to create & update comments
runs-on: ubuntu-latest
runs-on: [self-hosted, jammy]
steps:
- name: Check if CLA signed
uses: canonical/[email protected]
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/k8s_tunnel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
# Ensure project builds before running testing matrix
build:
name: Build
runs-on: ubuntu-latest
runs-on: [self-hosted, jammy]
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
Expand All @@ -34,7 +34,7 @@ jobs:
add-machine-test:
name: Add Machine
needs: build
runs-on: ubuntu-latest
runs-on: [self-hosted, jammy]
env:
ACTIONS_ALLOW_IPV6: false
strategy:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ permissions:

jobs:
goreleaser:
runs-on: ubuntu-latest
runs-on: [self-hosted, jammy]
environment: Release Environment
steps:
- uses: actions/checkout@v4
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/test_add_machine.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,21 @@ jobs:
# Ensure project builds before running testing matrix
build:
name: Build
runs-on: ubuntu-latest
runs-on: [self-hosted, jammy]
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: "go.mod"
cache: true
- run: go build -v .

# Run acceptance tests in a matrix with Terraform CLI versions
add-machine-test:
name: Add Machine
needs: build
runs-on: ubuntu-latest
runs-on: [self-hosted, jammy]
env:
ACTIONS_ALLOW_IPV6: false
strategy:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test_integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
# Ensure project builds before running testing matrix
build:
name: Build
runs-on: ubuntu-latest
runs-on: [self-hosted, jammy]
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
Expand All @@ -41,7 +41,7 @@ jobs:
test:
name: Integration
needs: build
runs-on: ubuntu-latest
runs-on: [self-hosted, jammy]
strategy:
fail-fast: false
matrix:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test_integration_jaas.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
# Ensure project builds before running test
build:
name: Build
runs-on: ubuntu-latest
runs-on: [self-hosted, jammy]
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
Expand All @@ -41,7 +41,7 @@ jobs:
test:
name: Integration
needs: build
runs-on: ubuntu-latest
runs-on: [self-hosted, jammy]
strategy:
fail-fast: false
timeout-minutes: 60
Expand Down
1 change: 0 additions & 1 deletion internal/provider/provider_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ func TestProviderConfigureAddresses(t *testing.T) {
assert.Equal(t, confResp.Diagnostics.HasError(), true)
err := confResp.Diagnostics.Errors()[0]
assert.Equal(t, diag.SeverityError, err.Severity())
assert.Equal(t, "dial tcp 192.0.2.100:17070: i/o timeout", err.Summary())
assert.Equal(t, "Connection error, please check the controller_addresses property set on the provider", err.Detail())
}

Expand Down

0 comments on commit 5924142

Please sign in to comment.