generated from geekcell/terraform-aws-module-template
-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (58 loc) · 1.43 KB
/
test.yaml
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
---
###############
## Run tests ##
###############
#
# Documentation:
# https://help.github.com/en/articles/workflow-syntax-for-github-actions
#
name: Test
on:
pull_request:
push:
branches: [ main ]
##########################
# Prevent duplicate jobs #
##########################
concurrency:
group: ${{ github.repository }}
cancel-in-progress: false
permissions:
id-token: write
contents: read
###############
# Run the job #
###############
jobs:
terratest:
name: Terratest
runs-on: ubuntu-latest
steps:
############################
# Checkout the source code #
############################
- name: Checkout
uses: actions/checkout@v3
#############################
# Configure AWS credentials #
#############################
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: arn:aws:iam::${{ vars.AWS_TESTING_ACCOUNT_ID }}:role/${{ vars.AWS_TESTING_ROLE }}
aws-region: ${{ vars.AWS_TESTING_REGION }}
mask-aws-account-id: false
################
# Setup Golang #
################
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version-file: 'go.mod'
#############
# Run tests #
#############
- name: Run Tests
timeout-minutes: 30
working-directory: test
run: go test -v