-
Notifications
You must be signed in to change notification settings - Fork 64
50 lines (46 loc) · 1.41 KB
/
main.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
name: Pre-commit Checks
on:
pull_request:
branches:
- master
push:
branches:
- master
workflow_dispatch: {}
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Source Code
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: .go_version
- name: Check License
run: make license-check
- name: Set Node.js Environment
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
- name: Build Prod
run: make build-prod
- name: Test Coverage
run: make test_js_coverage
- name: Go lint
run: make lint
- name: Go unit tests
run: make test_go
- name: Code coverage
uses: codecov/codecov-action@v4
with:
files: build/coverage.txt
# After codecov/codecov-action@v4, tokenless uploading of coverage files to non-public repo is unsupported.
# To enable codecov analysis in your forked repo. Please configure CODECOV_TOKEN in your repository secrets.
# Ref: https://docs.codecov.com/docs/adding-the-codecov-token
token: ${{ secrets.CODECOV_TOKEN }}