Skip to content

feat(provider): choose between constant & exponential backoff for actions #800

feat(provider): choose between constant & exponential backoff for actions

feat(provider): choose between constant & exponential backoff for actions #800

Workflow file for this run

name: Test
on:
pull_request:
jobs:
integration:
name: Integration ${{ matrix.terraform }}
permissions:
id-token: write
runs-on: ubuntu-latest
strategy:
matrix:
terraform: [ v1.5.x, v1.6.x ]
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Unshallow
run: git fetch --prune --unshallow
- uses: hashicorp/setup-terraform@v3
with:
terraform_version: ${{ matrix.terraform }}
terraform_wrapper: false
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "1.21"
- name: HCLOUD_TOKEN
env:
HCLOUD_TOKEN: ${{ secrets.HCLOUD_TOKEN }}
run: |
echo "HCLOUD_TOKEN=$HCLOUD_TOKEN" >> "$GITHUB_ENV"
- uses: hetznercloud/tps-action@main
if: ${{ vars.USE_TPS }}
- name: check HCLOUD_TOKEN
run: |
if [[ "${HCLOUD_TOKEN:-}" == "" ]]; then
echo "::error ::Couldn't determine HCLOUD_TOKEN. Are repository secrets correctly set?"
exit 1
fi
- name: Run tests
env:
# Domain must be available in the account running the tests. This domain is available in the account
# running the public integration tests.
CERT_DOMAIN: hc-integrations-test.de
# Debug Logs
TF_LOG: DEBUG
TF_LOG_PATH: test.log
run: |
make testacc
make
- uses: actions/upload-artifact@v3
if: always() # Also run if the tests failed
with:
name: debug-logs
path: internal/e2etests/**/test.log
unit_tests:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Unshallow
run: git fetch --prune --unshallow
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "1.21"
- name: Run tests
run: |
make test