forked from github-aws-runners/terraform-aws-github-runner
-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (45 loc) · 1.3 KB
/
lambda.yml
File metadata and controls
50 lines (45 loc) · 1.3 KB
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: Build lambdas
on:
pull_request:
branches:
- main
paths:
- 'lambdas/**'
- '.github/workflows/lambda.yml'
permissions:
contents: read
jobs:
build:
name: Build and test lambda functions
runs-on: ubuntu-latest
container:
image: node:22@sha256:2bb201f33898d2c0ce638505b426f4dd038cc00e5b2b4cbba17b069f0fff1496
defaults:
run:
working-directory: ./lambdas
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
with:
egress-policy: audit
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
persist-credentials: false
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Run prettier
run: yarn format-check
- name: Run linter
run: yarn lint
- name: Run tests
id: test
run: yarn test
- name: Build distribution
run: yarn build
- name: Upload coverage report
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
if: ${{ failure() }}
with:
name: coverage-reports
path: ./**/coverage
retention-days: 5