-
Notifications
You must be signed in to change notification settings - Fork 21
60 lines (50 loc) · 1.36 KB
/
build.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
name: "tf-aws: Build and Test"
on:
push:
paths-ignore:
- README.md
jobs:
build:
name: Build
runs-on: ubuntu-latest
env:
AWS_REGION: ${{ secrets.AWS_REGION }}
VPC_ID: ${{ secrets.VPC_ID}}
AVAILABILITY_ZONES: ${{ secrets.AVAILABILITY_ZONES}}
SUBNET_IDS: ${{ secrets.SUBNET_IDS }}
steps:
- name: Setup Go 1.13
uses: actions/setup-go@v5
with:
go-version: 1.13.5
cache: false
id: go
- name: Setup Terraform environment
uses: hashicorp/setup-terraform@v3
with:
terraform_version: 0.12.25
terraform_wrapper: false
- name: Check out code into the Go module directory
uses: actions/checkout@v4
with:
submodules: true
- name: Public IP
id: ip
run: |
echo "ipv4=$( curl https://checkip.amazonaws.com/ )" >> "$GITHUB_ENV"
- name: Get dependencies
run: |
cd ./test
go mod download
- name: Setup AWS CLI
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_REGION }}
- name: Build
env:
ALLOWED_SOURCES: "${ipv4}/32"
run: |
cd ./test
go test -v -timeout 90m yugabyte_test.go