Skip to content

Commit

Permalink
fix: update run-on for all github actions
Browse files Browse the repository at this point in the history
The integration tests are failing with parallelization due to running
out of disk space during the test. Add to runs-on: xxlarge. There
currently isn't a larger runner configured.

Add self-hosted to all runs-on to ensure we're using our self hosted
runners. Small changes due to ubuntu-latest vs linux tag.
  • Loading branch information
hmlanigan committed Jul 10, 2024
1 parent 8fe1a51 commit 7387523
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 19 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: [linux, self-hosted]
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: [linux, self-hosted]
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: [linux, self-hosted]
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: [linux, self-hosted]
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: [linux, self-hosted]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
Expand Down
6 changes: 3 additions & 3 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: [linux, self-hosted, xxlarge]
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: [linux, self-hosted, xxlarge]
timeout-minutes: 60
strategy:
fail-fast: false
Expand Down Expand Up @@ -85,4 +85,4 @@ jobs:
- env:
TF_ACC: "1"
TEST_CLOUD: ${{ matrix.cloud }}
run: go test -timeout 40m -v -cover ./internal/provider/
run: go test -parallel 3 -timeout 40m -v -cover ./internal/provider/
5 changes: 2 additions & 3 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: [linux, self-hosted]
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
Expand All @@ -34,13 +34,12 @@ jobs:
add-machine-test:
name: Add Machine
needs: build
runs-on: ubuntu-latest
runs-on: [linux, self-hosted]
env:
ACTIONS_ALLOW_IPV6: false
strategy:
fail-fast: false
matrix:
# Only on lxd
cloud:
- "microk8s"
terraform:
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: [linux, self-hosted]
environment: Release Environment
steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/static-analysis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ permissions:
jobs:
conventional-commits:
name: Check conventional commits
runs-on: ubuntu-latest
runs-on: [linux, self-hosted]
steps:
- uses: actions/checkout@v4
- uses: wagoid/commitlint-github-action@v6
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: [linux, self-hosted]
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: [linux, self-hosted]
env:
ACTIONS_ALLOW_IPV6: false
strategy:
Expand Down
5 changes: 3 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: [linux, self-hosted]
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: [linux, self-hosted, xxlarge]
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -92,5 +92,6 @@ jobs:
- env:
TF_ACC: "1"
TEST_CLOUD: ${{ matrix.action-operator.cloud }}
TF_IN_AUTOMATION: true
run: go test -parallel 3 -timeout 40m -v -cover ./internal/provider/
timeout-minutes: 40
4 changes: 2 additions & 2 deletions .github/workflows/unit_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
# Ensure project builds before running unit tests
build:
name: Build
runs-on: ubuntu-latest
runs-on: [linux, self-hosted]
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
Expand All @@ -34,7 +34,7 @@ jobs:
test:
name: Juju unit tests
needs: build
runs-on: ubuntu-latest
runs-on: [linux, self-hosted]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
Expand Down

0 comments on commit 7387523

Please sign in to comment.