-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (39 loc) · 928 Bytes
/
server-ci.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
46
47
name: Server CI
on:
push:
branches:
- main
paths:
- 'server/**'
- '.github/workflows/server-ci.yaml'
jobs:
build-and-test:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./server
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: '1.20.x'
- name: SCA & Go vet
run: |
go install honnef.co/go/tools/cmd/staticcheck@latest
staticcheck ./...
go vet ./...
- name: Install dependencies
run: go get ./...
- name: Test
run: go test ./...
- name: Build server
run: go build -o digits ./...
- name: Upload binary artifact
uses: actions/upload-artifact@v3
with:
name: digits
path: digits
- name: list
run: ls -la