-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (30 loc) · 893 Bytes
/
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
name: Run Go Tests
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: "1.23.1"
- name: Install dependencies
run: go mod tidy
- name: Run go fmt
run: go fmt ./...
- name: Run tests
run: go test ./...
- name: Run Build (x86_64)
run: env GOOS=linux GOARCH=amd64 go build -o build/srd-tools-linux-amd64 ./cmd/srd/main.go
- name: Run Build (ARM 64)
run: env GOOS=linux GOARCH=arm64 go build -o build/srd-tools-linux-arm64 ./cmd/srd/main.go
- name: Run Build (MacOS Silicon)
run: env GOOS=darwin GOARCH=arm64 go build -o build/srd-tools-darwin-arm64 ./cmd/srd/main.go