-
Notifications
You must be signed in to change notification settings - Fork 16
46 lines (44 loc) · 1.1 KB
/
build-golang.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
name: Golang
on:
workflow_call:
workflow_dispatch:
pull_request:
paths:
- "go/**"
- "proto/**"
- ".github/workflows/*golang*"
- "devops/**"
push:
branches:
- main
paths:
- "go/**"
- "proto/**"
- ".github/workflows/*golang*"
- "devops/**"
jobs:
build-and-test-golang:
name: Build, Test
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, windows-latest, macos-latest ]
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.18
cache: true
cache-dependency-path: go/go.sum
- name: Build and Test Golang
run: |
go version
go test -covermode "atomic" -coverprofile "coverage.txt"
working-directory: go/services
shell: pwsh
env:
TEST_SERVER_ENDPOINT: ${{ secrets.TEST_SERVER_ENDPOINT }}
TEST_SERVER_PORT: ${{ secrets.TEST_SERVER_PORT }}
TEST_SERVER_USE_TLS: ${{ secrets.TEST_SERVER_USE_TLS }}