-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (54 loc) · 1.45 KB
/
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
48
49
50
51
52
53
54
name: Test & Build
on:
pull_request:
push:
branches:
- main
defaults:
run:
shell: bash
working-directory: ./
permissions:
contents: read
env:
DO_NOT_TRACK: 1
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0
with:
egress-policy: audit
- name: Checkout
uses: actions/checkout@v4
with:
repository: ${{ github.event.pull_request.head.repo.full_name || github.repository }}
ref: ${{ github.event.pull_request.head.ref || github.ref }}
fetch-depth: 1
- name: Setup NodeJS environment
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: yarn
- name: Install frontend dependencies
run: yarn install --frozen-lockfile;
- name: Spellcheck
run: yarn spellcheck;
- name: Setup Go environment
uses: actions/setup-go@v5
with:
go-version: "1.22.1"
cache-dependency-path: "**/*.sum"
- name: Validate environment
run: |
echo "-------- node version -----"
node --version
echo "-------- npm version -----"
npm --version
echo "-------- yarn version -----"
yarn --version
echo "-------- go version -----"
go version
- name: Test
run: yarn test