Skip to content

feat(pricing): add hcloud_pricing data source #2635

feat(pricing): add hcloud_pricing data source

feat(pricing): add hcloud_pricing data source #2635

Workflow file for this run

name: Test
on:
push:
branches: [main]
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
env:
GOTOOLCHAIN: local
jobs:
unit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6
with:
go-version-file: go.mod
- run: go test -v -timeout=30s -parallel=8 -coverprofile=coverage.txt -coverpkg=./... ./...
- uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v6
if: >
!startsWith(github.head_ref, 'renovate/') &&
!startsWith(github.head_ref, 'release-please--')
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: unit
e2e:
if: >
github.event_name == 'push' ||
github.event.pull_request.draft == false
needs: [unit]
runs-on: ubuntu-latest
permissions:
id-token: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.tool }}-${{ matrix.version }}
cancel-in-progress: true
strategy:
fail-fast: false
matrix:
include:
- tool: opentofu
version: v1.10.x
- tool: opentofu
version: v1.11.x
- tool: opentofu
version: v1.12.x
- tool: terraform
version: v1.14.x
- tool: terraform
version: v1.15.x
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
- if: matrix.tool == 'terraform'
uses: hashicorp/setup-terraform@dfe3c3f87815947d99a8997f908cb6525fc44e9e # v4
with:
terraform_version: ${{ matrix.version }}
terraform_wrapper: false
- if: matrix.tool == 'opentofu'
uses: opentofu/setup-opentofu@847eaa4afeb791b06daa46e8eafa8b1b68d7cfb4 # v2
with:
tofu_version: ${{ matrix.version }}
tofu_wrapper: false
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6
with:
go-version-file: go.mod
- uses: hetznercloud/tps-action@dc6d67c5768ca43b840429b6c7409cda61cf4092 # main
- if: matrix.tool == 'opentofu'
run: |
echo TF_ACC_TERRAFORM_PATH="$(which tofu)" >> $GITHUB_ENV
echo TF_ACC_PROVIDER_NAMESPACE="hashicorp" >> $GITHUB_ENV
echo TF_ACC_PROVIDER_HOST="registry.opentofu.org" >> $GITHUB_ENV
- run: go test -v -timeout=30m -parallel=8 -coverprofile=coverage.txt -coverpkg=./... ./...
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
TF_ACC: 1
TF_LOG: DEBUG
TF_LOG_PATH_MASK: test-%s.log
TEST_DATACENTER: ${{ vars.TEST_DATACENTER }}
TEST_LOCATION: ${{ vars.TEST_LOCATION }}
- uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v6
if: >
!startsWith(github.head_ref, 'renovate/') &&
!startsWith(github.head_ref, 'releaser-pleaser--')
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: e2e
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
if: always()
with:
name: debug-logs-${{ matrix.tool }}-${{ matrix.version }}
path: internal/**/test-*.log