-
Notifications
You must be signed in to change notification settings - Fork 9
45 lines (37 loc) · 906 Bytes
/
test.yaml
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
on:
push:
branches:
- main
pull_request:
branches:
- "*"
merge_group:
types: [checks_requested]
name: Test
jobs:
test:
strategy:
matrix:
go-version: [1.21.x]
runs-on:
- nscloud-ubuntu-22.04-amd64-8x16-with-cache
- nscloud-cache-size-10gb
- nscloud-cache-tag-foundation-golang
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
cache: false
- name: Setup runner cache
uses: namespacelabs/nscloud-cache-action@v1
with:
cache: go
- name: Test
run: go test ./...
- name: Check Go Formatting
run: go fmt ./... && git diff --exit-code
- name: Check Go Mod Tidyness
run: go mod tidy && git diff --exit-code