-
Notifications
You must be signed in to change notification settings - Fork 132
57 lines (49 loc) · 1.3 KB
/
build.yml
File metadata and controls
57 lines (49 loc) · 1.3 KB
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
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.18, 1.19]
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}
- name: Go Build dcrdata
env:
GO111MODULE: "on"
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.50.1"
- name: Go Tests
env:
GO111MODULE: "on"
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@v3
- name: Use nodejs ${{ matrix.node-version }}
uses: actions/setup-node@v3
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