forked from wundergraph/cosmo
-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (51 loc) · 1.57 KB
/
aws-lambda-router-ci.yaml
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
51
52
53
54
55
56
57
58
59
60
61
62
63
name: AWS Lambda Router CI
on:
pull_request:
paths:
- "aws-lambda-router/**/*"
- "router-tests/**/*"
- ".github/workflows/aws-lambda-router-ci.yaml"
concurrency:
group: ${{github.workflow}}-${{github.head_ref}}
cancel-in-progress: true
env:
CI: true
jobs:
build_test:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/cache@v4
with:
path: |
~/.cache/go-build
~/go/pkg/mod
# The go install / version instructions are inside the Makefile, so we need to cache the Makefile.
key: ${{ runner.os }}-go-${{ hashFiles('aws-lambda-router/go.sum') }}-makefile-${{ hashFiles('Makefile') }}
restore-keys: |
${{ runner.os }}-go-
- uses: ./.github/actions/go
with:
cache-dependency-path: router/go.sum
- name: Install tools
run: make setup-build-tools
- name: Generate code
run: make generate-go
- name: Check if git is not dirty after generating files
run: git diff --no-ext-diff --exit-code
- name: Install dependencies
working-directory: ./aws-lambda-router
run: go mod download
- name: Run linters on router
uses: ./.github/actions/go-linter
with:
working-directory: ./aws-lambda-router
- name: Test
working-directory: ./aws-lambda-router
run: make test
- name: Build
working-directory: ./aws-lambda-router
run: make build