-
Notifications
You must be signed in to change notification settings - Fork 2
42 lines (39 loc) · 1.19 KB
/
test.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
name: Terraform Provider Tests
on:
workflow_call:
pull_request:
branches:
- master
permissions:
# Permission for checking out code
contents: read
jobs:
acceptance-tests:
name: Acceptance Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
cache: true
go-version-file: 'go.mod'
- uses: hashicorp/setup-terraform@v3
with:
terraform_version: '1.5.*'
terraform_wrapper: false
- run:
go test -v ./... -coverprofile=coverage.out
env:
TF_ACC: '1'
MC_API_KEY_ID: ${{ secrets.ACC_TEST_MC_API_KEY_ID }}
MC_API_KEY_TOKEN: ${{ secrets.ACC_TEST_MC_API_KEY_TOKEN }}
BQ_SERVICE_ACCOUNT: ${{ secrets.ACC_TEST_BQ_SERVICE_ACCOUNT }}
PG_HOST: ${{ secrets.ACC_TEST_PG_HOST }}
PG_PORT: ${{ secrets.ACC_TEST_PG_PORT }}
PG_DATABASE: ${{ secrets.ACC_TEST_PG_DATABASE }}
PG_USER: ${{ secrets.ACC_TEST_PG_USER }}
PG_PASSWORD: ${{ secrets.ACC_TEST_PG_PASSWORD }}
- uses: actions/upload-artifact@v3
with:
name: coverage
path: ./coverage.out