-
Notifications
You must be signed in to change notification settings - Fork 1
55 lines (46 loc) · 1.47 KB
/
build.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
name: Create draft release, test & build draft package
on:
push:
branches:
- main
permissions:
contents: write
pull-requests: write
jobs:
draft-release:
runs-on: ubuntu-latest
steps:
- name: Draft release
uses: release-drafter/release-drafter@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run-tests:
runs-on: ubuntu-latest
strategy:
matrix:
go-image: [ '1.18-bullseye' ]
steps:
- uses: actions/checkout@v3
- name: Run coverage
run: docker run --rm -v ${{ github.workspace }}:/src -w /src golang:${{ matrix.go-image }} go test ./... -race -coverprofile coverage.out -covermode atomic
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
fail_ci_if_error: true # optional (default = false)
verbose: true # optional (default = false)
build-package:
runs-on: ubuntu-latest
strategy:
matrix:
arch: [ 'amd64', 'arm64' ]
steps:
- uses: actions/checkout@v3
- name: Build & package layers (amd64 & arm64)
run: |
make package ARCH=${{ matrix.arch }} VERSION=draft
- name: Upload package as artifact
uses: actions/upload-artifact@v3
with:
name: firetail-lambda-extension-${{ matrix.arch }}-draft
path: build/firetail-extension-${{ matrix.arch }}-draft.zip