-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmoon.yml
More file actions
64 lines (56 loc) · 1.42 KB
/
Copy pathmoon.yml
File metadata and controls
64 lines (56 loc) · 1.42 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
language: 'go'
layer: 'application'
stack: 'backend'
tags:
- 'go'
- 'service'
- 'aws'
project:
title: 'github-token-broker'
description: 'AWS Lambda broker for short-lived GitHub App installation tokens.'
owner: '@meigma'
maintainers:
- '@meigma'
toolchains:
default: 'go'
fileGroups:
sources:
- 'cmd/**/*.go'
- 'internal/**/*.go'
integrationTests:
- 'internal/integration/**/*.go'
mods:
- 'go.mod'
- 'go.sum'
tasks:
fmt:
command: "bash -c 'test -z \"$(gofmt -l ./cmd ./internal)\"'"
toolchains: ['go']
inputs:
- '@group(sources)'
test:
command: 'go test ./cmd/... ./internal/...'
toolchains: ['go']
inputs:
- '@group(sources)'
- '@group(mods)'
build:
command: 'bash -c "rm -rf build dist && mkdir -p build dist && GOOS=linux GOARCH=arm64 CGO_ENABLED=0 go build -buildvcs=false -tags lambda.norpc -trimpath -ldflags=\"-s -w\" -o build/bootstrap ./cmd/github-token-broker && (cd build && zip -X ../dist/github-token-broker.zip bootstrap)"'
toolchains: ['go']
inputs:
- '@group(sources)'
- '@group(mods)'
outputs:
- 'dist/github-token-broker.zip'
check:
deps:
- '~:fmt'
- '~:test'
- '~:build'
integration:
command: 'go test -tags integration -count 1 ./internal/integration'
toolchains: ['go']
inputs:
- '@group(sources)'
- '@group(integrationTests)'
- '@group(mods)'