Skip to content

Commit 3dd2d26

Browse files
committed
build a test, added to the pipeline
1 parent 954eb90 commit 3dd2d26

1 file changed

Lines changed: 56 additions & 0 deletions

File tree

.github/workflows/build.yaml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Build
2+
3+
permissions:
4+
contents: read
5+
6+
on:
7+
push:
8+
branches:
9+
- main
10+
pull_request:
11+
branches:
12+
- main
13+
14+
jobs:
15+
build:
16+
name: Build
17+
runs-on: ubuntu-latest
18+
env:
19+
GOWORK: off
20+
steps:
21+
- name: Checkout code
22+
uses: actions/checkout@v4
23+
24+
- name: Set up Go
25+
uses: actions/setup-go@v5
26+
with:
27+
go-version-file: go.mod
28+
cache: true
29+
30+
- name: Download dependencies
31+
run: go mod download
32+
33+
- name: Build
34+
run: go build ./...
35+
36+
test:
37+
name: Test
38+
runs-on: ubuntu-latest
39+
needs: build
40+
env:
41+
GOWORK: off
42+
steps:
43+
- name: Checkout code
44+
uses: actions/checkout@v4
45+
46+
- name: Set up Go
47+
uses: actions/setup-go@v5
48+
with:
49+
go-version-file: go.mod
50+
cache: true
51+
52+
- name: Download dependencies
53+
run: go mod download
54+
55+
- name: Test
56+
run: go test ./...

0 commit comments

Comments
 (0)