Skip to content

Commit ed37e90

Browse files
tsonglewWine93
authored andcommitted
action: add build and test action
Signed-off-by: Tsong Lew <[email protected]>
1 parent ab074fd commit ed37e90

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

.github/workflows/go.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Go
2+
3+
on:
4+
push:
5+
branches: [ $default-branch, "develop" ]
6+
pull_request:
7+
branches: [ $default-branch, "develop" ]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v3
14+
- name: Set up Go
15+
uses: actions/setup-go@v3
16+
with:
17+
go-version: 1.18
18+
- name: Generate SSH key
19+
run: ssh-keygen -f ~/.ssh/id_rsa -P ""
20+
- name: Test
21+
run: make test
22+
23+
build:
24+
needs: test
25+
runs-on: ubuntu-latest
26+
steps:
27+
- uses: actions/checkout@v3
28+
- name: Set up Go
29+
uses: actions/setup-go@v3
30+
with:
31+
go-version: 1.18
32+
- name: Set dependencies
33+
run: sudo apt update && sudo apt install musl-tools
34+
- name: Build
35+
run: make build

0 commit comments

Comments
 (0)