Skip to content

feat(functions): add tem example #211

feat(functions): add tem example

feat(functions): add tem example #211

---
name: golang-function-testing
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
go-example:
runs-on: ubuntu-latest
strategy:
matrix:
tests: [
{ directory: 'cors-go', go-version: '1.19' },
{ directory: 'go-hello-world', go-version: '1.20' },
{ directory: 'go-mnq-sqs-publish', go-version: '1.18' },
{ directory: 'go-upload-file-s3-multipart', go-version: '1.20' }
]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Go ${{ matrix.tests.go-version }}
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.tests.go-version}}
- name: Run test for ${{ matrix.tests.directory }}
working-directory: functions/${{ matrix.tests.directory }}
run: |
go run test/main.go &
go test ./...
env:
# for go-mnq-sqs-publish example
SQS_ACCESS_KEY: ${{ secrets.SQS_ACCESS_KEY }}
SQS_SECRET_KEY: ${{ secrets.SQS_SECRET_KEY }}
# for go-upload-file-s3-multipart example
S3_ENABLED: false