-
Notifications
You must be signed in to change notification settings - Fork 1
44 lines (36 loc) · 1.11 KB
/
acceptance.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# Derived from https://github.com/issyl0/terraform-provider-improvmx/blob/main/.github/workflows/acceptance.yml
name: Real Provider Tests
on:
push:
pull_request:
jobs:
test:
runs-on: ubuntu-latest
env:
TF_VAR_rp_api_token: ${{ secrets.REDIRECTPIZZA_TF_API_TOKEN }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: 1.21
- run: |
go mod download
go build .
- uses: hashicorp/setup-terraform@v3
- run: |
cat <<~EOF >> ~/.terraformrc
provider_installation {
dev_overrides {
"github.com/enflow/redirectpizza" = "/home/runner/work/terraform-provider-redirectpizza/terraform-provider-redirectpizza"
}
}
~EOF
- name: plan
run: terraform plan
working-directory: tests/acceptance/
- name: apply
run: terraform apply -auto-approve
working-directory: tests/acceptance/
- name: destroy
run: terraform destroy -auto-approve
working-directory: tests/acceptance/