-
Notifications
You must be signed in to change notification settings - Fork 1
40 lines (38 loc) · 1.33 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
name: test
on: [push]
jobs:
test:
strategy:
matrix:
platform: [ubuntu-latest]
go-version: [1.19.x]
terraform-version: [1.3.2]
runs-on: ${{ matrix.platform }}
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0 # to retrieve git tags
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
- name: Generate SORACOM Profile
# register the outputs `base64 ~/.soracom/default.json` as a repository secret named SORACOM_PROFILE_JSON_BASE64_ENCODED
env:
SORACOM_PROFILE_JSON_BASE64_ENCODED: ${{ secrets.SORACOM_PROFILE_JSON_BASE64_ENCODED }}
run: |
mkdir -p ~/.soracom
echo -n $SORACOM_PROFILE_JSON_BASE64_ENCODED | base64 --decode > ~/.soracom/default.json
- name: Run CI test
run: make ci-test GOPATH=/home/runner/go
env:
SORACOM_AUTH_KEY: ${{ secrets.SORACOM_AUTH_KEY }}
SORACOM_AUTH_KEY_ID: ${{ secrets.SORACOM_AUTH_KEY_ID }}
- name: Setup Terraform
uses: hashicorp/setup-terraform@v2
with:
terraform_version: ${{ matrix.terraform-version }}
terraform_wrapper: false
- name: Run CI tests for examples/docs
run: make -f terraform.mk ci-test