-
Notifications
You must be signed in to change notification settings - Fork 128
54 lines (45 loc) · 1.42 KB
/
build.yml
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
name: Build and Test
on: [push, pull_request]
permissions:
contents: read
jobs:
build-go:
name: Go Build and Test
runs-on: ubuntu-latest
strategy:
matrix:
go: ['1.20', '1.21']
steps:
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab #v3.5.2
- name: Set up Go
uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 #v4.0.1
with:
go-version: ${{ matrix.go }}
- name: Go Build dcrdata
run: go build -v ./...
working-directory: ./cmd/dcrdata
- name: Install Linters
run: "curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.55.2"
- name: Go Tests
run: |
./run_tests.sh
build-js:
name: Build JS
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x, 18.x]
steps:
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab #v3.5.2
- name: Use nodejs ${{ matrix.node-version }}
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c #v3.6.0
with:
node-version: ${{ matrix.node-version }}
- name: npm clean-install
run: npm clean-install
working-directory: ./cmd/dcrdata
- name: npm run build
run: |
npm run build
git diff --exit-code views/extras.tmpl
working-directory: ./cmd/dcrdata