-
Notifications
You must be signed in to change notification settings - Fork 13
79 lines (74 loc) · 1.87 KB
/
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
name: CI
on:
push:
branches:
- main
tags:
- "*"
paths-ignore:
- ".github/workflows/bot.yaml"
- ".github/workflows/todo-issue.yaml"
pull_request:
branches:
- "*"
paths-ignore:
- "**.md"
- "docs/**"
- "data-lab/**"
- ".github/workflows/bot.yaml"
- ".github/workflows/todo-issue.yaml"
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.18
- run: make test
name: Run tests and generate coverage report
shell: bash
- uses: codecov/codecov-action@v3
with:
files: ./cover.out
fail_ci_if_error: true
- run: go vet -v ./...
build-all:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.18
- run: go build -o copilot-ops-linux-amd64
env:
GOOS: linux
GOARCH: amd64
- run: go build -o copilot-ops-linux-arm64
env:
GOOS: linux
GOARCH: arm64
- run: go build -o copilot-ops-darwin-amd64
env:
GOOS: darwin
GOARCH: amd64
- run: go build -o copilot-ops-darwin-arm64
env:
GOOS: darwin
GOARCH: arm64
- uses: actions/upload-artifact@v3
with:
name: copilot-ops-linux-amd64
path: copilot-ops-linux-amd64
- uses: actions/upload-artifact@v3
with:
name: copilot-ops-linux-arm64
path: copilot-ops-linux-arm64
- uses: actions/upload-artifact@v3
with:
name: copilot-ops-darwin-amd64
path: copilot-ops-darwin-amd64
- uses: actions/upload-artifact@v3
with:
name: copilot-ops-darwin-arm64
path: copilot-ops-darwin-arm64