-
Notifications
You must be signed in to change notification settings - Fork 1
113 lines (106 loc) · 3.04 KB
/
test-extensive.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
name: extensive tests
on:
push:
branches:
- main
paths:
- go.mod
- go.sum
- '**.go'
merge_group:
type:
- checks_requested
pull_request:
paths:
- go.mod
- go.sum
- '**.go'
types:
- opened
- synchronize
- reopened
- labeled
permissions:
contents: read
# Ensures only 1 action runs per PR and previous is canceled on new trigger
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
build:
name: build
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0
with:
go-version-file: 'go.mod'
- run: make build
- name: Run linters
uses: golangci/golangci-lint-action@ec5d18412c0aeab7936cb16880d708ba2a64e1ae # v6
with:
version: latest
test-terraform:
name: integration-terraform
needs: build
runs-on: ubuntu-latest
if: '!github.event.pull_request.head.repo.fork'
timeout-minutes: 30
strategy:
fail-fast: false
max-parallel: 1
matrix:
terraform:
- '1.6.*'
- '1.9.*'
- latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0
with:
go-version-file: 'go.mod'
- uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd # v3.1.2
with:
terraform_version: ${{ matrix.terraform }}
terraform_wrapper: false
- run: make testacc
env:
PLANETSCALE_SERVICE_TOKEN_ID: ${{ secrets.PLANETSCALE_SERVICE_TOKEN_ID }}
PLANETSCALE_SERVICE_TOKEN: ${{ secrets.PLANETSCALE_SERVICE_TOKEN }}
timeout-minutes: 10
test-tofu:
name: integration-tofu
needs: build
runs-on: ubuntu-latest
if: '!github.event.pull_request.head.repo.fork'
timeout-minutes: 30
strategy:
max-parallel: 1
fail-fast: false
matrix:
tofu:
- '1.6.*'
- '1.7.*'
- '1.8.*'
- latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0
with:
go-version-file: 'go.mod'
- uses: opentofu/setup-opentofu@592200bd4b9bbf4772ace78f887668b1aee8f716 # v1
with:
tofu_version: ${{ matrix.tofu }}
tofu_wrapper: false
- run: make testacc
env:
PLANETSCALE_SERVICE_TOKEN_ID: ${{ secrets.PLANETSCALE_SERVICE_TOKEN_ID }}
PLANETSCALE_SERVICE_TOKEN: ${{ secrets.PLANETSCALE_SERVICE_TOKEN }}
timeout-minutes: 10