-
Notifications
You must be signed in to change notification settings - Fork 7
45 lines (38 loc) · 1.07 KB
/
build-and-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
name: CI - Build and Test Application
on:
pull_request:
push:
branches:
- main
jobs:
build-and-test:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-intel, macos-arm, windows-latest]
include:
- os: ubuntu-latest
# No need to upload coverage reports for multiple platforms
uploadCoverage: true
- os: macos-intel
runsOn: macos-12
- os: macos-arm
runsOn: macos-14
runs-on: ${{ matrix.runsOn || matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: 1.22
- name: Build
run: go build ./cmd/oms
- name: Unit Tests
run: go test ./...
- name: Integration Tests
if: matrix.os == 'ubuntu-latest'
run: go test -tags=integration ./...
- name: Coverage
if: matrix.os == 'ubuntu-latest'
run: make unit-test-coverage integration-test-coverage coverage-report