-
-
Notifications
You must be signed in to change notification settings - Fork 26
80 lines (74 loc) · 2.09 KB
/
go.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
name: Go
on: [push, pull_request]
jobs:
test:
strategy:
matrix:
go:
- "1.21"
- "1.22"
- "1.23"
name: Build
runs-on: ubuntu-latest
services:
localstack:
image: localstack/localstack:1.4.0
env:
SERVICES: lambda,sts,s3
DEFAULT_REGION: ap-northeast-1
DEBUG: 1
LAMBDA_EXECUTOR: local
TEST_AWS_ACCOUNT_ID: 123456789012
ports:
- 4566:4566
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
cache: true
cache-dependency-path: go.sum
id: go
- name: Build & Test
run: |
echo $PATH
make clean
make test
env:
TZ: Asia/Tokyo
- name: create test
run: |
make
./cmd/lambroll/lambroll deploy \
--function test/function.json \
--src test/src \
--endpoint http://127.0.0.1:4566 \
--tfstate test/terraform.tfstate \
--prefixed-tfstate "prefix1_=test/terraform_1.tfstate" \
--prefixed-tfstate "prefix2_=test/terraform_2.tfstate" \
--log-level debug
env:
FUNCTION_NAME: hello
AWS_REGION: ap-northeast-1
AWS_ACCESS_KEY_ID: dummy
AWS_SECRET_ACCESS_KEY: dummy
WORLD: a
- name: deploy test
run: |
make
./cmd/lambroll/lambroll deploy \
--function test/function.json \
--src test/src \
--endpoint http://127.0.0.1:4566 \
--tfstate test/terraform.tfstate \
--prefixed-tfstate "prefix1_=test/terraform_1.tfstate" \
--prefixed-tfstate "prefix2_=test/terraform_2.tfstate" \
--log-level debug
env:
FUNCTION_NAME: hello
AWS_REGION: ap-northeast-1
AWS_ACCESS_KEY_ID: dummy
AWS_SECRET_ACCESS_KEY: dummy
WORLD: a