-
Notifications
You must be signed in to change notification settings - Fork 94
66 lines (55 loc) · 1.82 KB
/
build-test.yml
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
name: Build and Test
# This workflow builds the code and runs the unit tests and integration tests.
#
# If this workflow is executed in the context of a fork, the integration tests are
# skipped and just the unit tests are executed. See the workflow "Trigger
# Integration Tests for Forks" for more details on how the integration tests are
# executed for forks.
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
merge_group: # run if triggered as part of a merge queue
schedule:
# this is checking periodically if there are any breaking API changes
# Every day at 00:00
- cron: '0 0 * * *'
defaults:
run:
shell: bash
jobs:
build_test:
name: Build and Test
permissions:
contents: read
checks: write
runs-on: ubuntu-latest
steps:
- name: ⬇️ Check out code into the Go module directory
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2.2
- name: 🛠️ Set up Go 1.x
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed #v5.1.0
with:
go-version: '~1.23'
- name: 🏗️ Compile
run: make compile
- name: 🧪 Unit test
run: make test testopts="--junitfile test-result-ubuntu-latest-unit.xml"
- name: ⬆️ Upload Test Results
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 #v4.4.3
if: always()
with:
name: Test Results - Unit
path: test-result-*.xml
- name: 🚀 Binary starts
run: go run ./cmd/monaco
upload_event:
name: "Upload Event File"
runs-on: ubuntu-latest
steps:
- name: Upload
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 #v4.4.3
with:
name: event_file
path: ${{ github.event_path }}