Skip to content

ci: update CI workflow and testing configurations #189

ci: update CI workflow and testing configurations

ci: update CI workflow and testing configurations #189

Workflow file for this run

name: deploy to lambda
on: [push]
jobs:
deploy_zip:
name: deploy lambda function from zip
runs-on: ubuntu-latest
strategy:
matrix:
go-version: ["1.22"]
steps:
- name: checkout source code
uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- name: Build binary
run: |
cd example && GOOS=linux go build -v -a -o main main.go && zip deployment.zip main
- name: deploy zip
uses: ./
with:
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws_region: ${{ secrets.AWS_REGION }}
function_name: gorush
runtime: nodejs20.x
zip_file: example/deployment.zip
- name: update env
uses: ./
with:
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws_region: ${{ secrets.AWS_REGION }}
function_name: gorush
zip_file: example/deployment.zip
environment: foo=bar,author=appleboy
debug: true
- name: update config
uses: ./
with:
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws_region: ${{ secrets.AWS_REGION }}
function_name: gorush
zip_file: example/deployment.zip
debug: true
memory_size: 128
timeout: 10
# origin value is "hello"
handler: foobar
- name: dry run
uses: ./
with:
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws_region: ${{ secrets.AWS_REGION }}
function_name: gorush
zip_file: example/deployment.zip
debug: true
dry_run: true
- name: update role
uses: ./
with:
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws_region: ${{ secrets.AWS_REGION }}
function_name: gorush
zip_file: example/deployment.zip
debug: true
role: arn:aws:iam::502946233425:role/service-role/gorush-role-8nb845iz
dry_run: true
- name: update runtime
uses: ./
with:
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws_region: ${{ secrets.AWS_REGION }}
function_name: gorush
zip_file: example/deployment.zip
debug: true
runtime: nodejs12.x
dry_run: true
- name: deploy description
uses: ./
with:
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws_region: ${{ secrets.AWS_REGION }}
function_name: gorush
zip_file: example/deployment.zip
debug: true
description: update description from github actions
- name: check publish flag
uses: ./
with:
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws_region: ${{ secrets.AWS_REGION }}
function_name: gorush
zip_file: example/deployment.zip
debug: true
publish: false
- name: check max attempts flag
uses: ./
with:
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws_region: ${{ secrets.AWS_REGION }}
function_name: gorush
zip_file: example/deployment.zip
debug: true
publish: false
max_attempts: 200
- name: deploy source code
uses: ./
with:
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws_region: ${{ secrets.AWS_REGION }}
function_name: gorush
source: example/main.go,example/go.mod,example/go.sum