Merge pull request #427 from fujiwara/fix/actions-bash3 #1196
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Go | |
on: [push, pull_request] | |
jobs: | |
test: | |
strategy: | |
matrix: | |
go: | |
- "1.20" | |
- "1.21" | |
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: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: ${{ matrix.go }} | |
id: go | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v3 | |
- 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 |