-
Notifications
You must be signed in to change notification settings - Fork 3
50 lines (41 loc) · 1.46 KB
/
pull_requests_lambda.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
name: "CI Lambda"
on:
pull_request:
defaults:
run:
shell: bash
jobs:
go-tests:
if: github.ref != 'refs/heads/main'
runs-on: ubuntu-latest
container: golang:1.23.0@sha256:613a108a4a4b1dfb6923305db791a19d088f77632317cfc3446825c54fb862cd
services:
dynamodb-local:
image: "amazon/dynamodb-local@sha256:d7ebddeb60fa418bcda218a6c6a402a58441b2a20d54c9cb1d85fd5194341753"
ports:
- 8000:8000
local-kms:
image: nsmithuk/local-kms@sha256:c0d7ff506b4aa1c061ae6743cf292a99fb9ec1968a6e5f3a3272110925860501
ports:
- "8080:8080"
volumes:
- "${{ github.workspace }}/.devcontainer/docker/kms/data:/data/"
- "${{ github.workspace }}/.devcontainer/docker/kms/init:/init/"
env:
KMS_REGION: "ca-central-1"
steps:
- name: Checkout
uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2.7.0
- name: Restart local-kms
# Restart local-kms after volumes have been checked out
# https://github.com/orgs/community/discussions/42127
uses: docker://docker@sha256:b936b8df214a188dab8643592b209be4aaef74c5c3f84488fc77be955869fd60
with:
args: docker restart "${{ job.services.local-kms.id }}"
- name: Install dependencies
run: go get .
- name: Test
run: make test
env:
AWS_ACCESS_KEY_ID: "AWSACCESSKEYID"
AWS_SECRET_ACCESS_KEY: "AWSSECRETACCESSKEY"