-
Notifications
You must be signed in to change notification settings - Fork 44
42 lines (36 loc) · 1015 Bytes
/
go.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
name: Go
on:
push:
branches: [master, main]
pull_request:
branches: [master, main]
jobs:
build:
runs-on: ubuntu-latest
env:
GOPATH: ${{ github.workspace }}
package: src/github.com/${{ github.repository }}
defaults:
run:
working-directory: ${{ env.GOPATH }}/${{ env.package }}
steps:
- uses: actions/checkout@v4
with:
path: ${{ env.GOPATH }}/${{ env.package }}
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ">=1.21.0"
cache-dependency-path: |
${{ env.GOPATH }}/${{ env.package }}/go.mod
${{ env.GOPATH }}/${{ env.package }}/go.sum
- name: Dependencies
run: go mod download
- name: Build
working-directory: ${{ env.GOPATH }}/${{ env.package }}
run: go build -v ./...
- name: Test
env:
APPKEY: ${{ secrets.APPKEY }}
SECRET: ${{ secrets.APP_SECRET }}
run: go test -v ./...