-
Notifications
You must be signed in to change notification settings - Fork 356
68 lines (66 loc) · 1.94 KB
/
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: Test
on:
push:
branches:
- master
pull_request:
jobs:
validator:
name: Run Linters and Checkers
runs-on: ubuntu-20.04
steps:
- name: Check-out code
uses: actions/checkout@v3
with:
fetch-depth: "1"
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: "1.20.6"
id: go
- name: Generate code
env:
NODE_OPTIONS: "--max-old-space-size=4096"
run: make gen
- name: Checks validator
run: make checks-validator
env:
GOLANGCI_LINT_FLAGS: --out-format github-actions
NODE_OPTIONS: "--max-old-space-size=4096"
test-go:
name: Run Go tests
runs-on: ubuntu-20.04
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v3
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: "1.20.6"
id: go
# No way to share code between workflows :-( If you change this, find and change the
# same code wherever "Find Go module and build caches" appears!
- name: Find Go module and build caches
run: |
echo GOMODCACHE=`go env GOMODCACHE` >> $GITHUB_ENV
echo GOCACHE=`go env GOCACHE` >> $GITHUB_ENV
cat $GITHUB_ENV
- name: Cache Go modules and builds
uses: actions/cache@v3
env:
cache-name: cache-go-modules
with:
path: |
${{ env.GOMODCACHE }}
${{ env.GOCACHE }}
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('go.mod', 'go.sum') }}
restore-keys: ${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Run tests
env:
NODE_OPTIONS: "--max-old-space-size=4096"
run: |
mkdir ./webui/dist
touch ./webui/dist/index.html
make test-go