-
Notifications
You must be signed in to change notification settings - Fork 5
51 lines (49 loc) · 1.26 KB
/
tests.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
name: Tests
on:
push:
branches: [ main ]
pull_request:
paths:
- '.github/workflows/tests.yml'
- 'go.mod'
- '**.go'
- 'tests/**'
jobs:
test-latest-versions:
runs-on: ubuntu-latest
strategy:
matrix:
tf_version: ["~1.7.0", "~1.8.0", "~1.9.0", "~1.10.0"]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: 'true'
- name: Fetch all tags
run: git fetch --force --tags
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Install Task
uses: arduino/setup-task@v2
with:
version: 3.x
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Cache Go modules
uses: actions/cache@v4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- uses: hashicorp/setup-terraform@v3
with:
terraform_version: ${{ matrix.tf_version }}
terraform_wrapper: false
- name: Run Tests
run: task ci
- name: Upload Coverage
run: |-
bash <(curl -s https://codecov.io/bash)