-
Notifications
You must be signed in to change notification settings - Fork 7
45 lines (42 loc) · 1 KB
/
build.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
# Copyright (c) 2024 Diagrid Inc.
# Licensed under the MIT License.
name: "Build and testing"
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
test:
name: Build and Test
runs-on: ubuntu-latest
timeout-minutes: 30
services:
etcd:
image: quay.io/coreos/etcd:v3.5.5
env:
ETCD_ADVERTISE_CLIENT_URLS: http://0.0.0.0:2379
ETCD_LISTEN_CLIENT_URLS: http://0.0.0.0:2379
ports:
- 2379:2379
env:
GOOS: linux
GOARCH: amd64
GOPROXY: https://proxy.golang.org
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
cache: 'false'
- name: Check mod tidy
run: |
go mod tidy
git diff --exit-code ./go.mod # check no changes
git diff --exit-code ./go.sum # check no changes
- name: Run test
run: go test