-
-
Notifications
You must be signed in to change notification settings - Fork 273
38 lines (38 loc) · 896 Bytes
/
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
name: Build and test
on:
workflow_dispatch:
push:
paths:
- '**.js'
- 'package.json'
pull_request:
paths:
- '**.js'
- 'package.json'
permissions:
contents: read
actions: read
checks: write
jobs:
test:
if: |
!contains(toJSON(github.event.commits.*.message), '[skip-ci]') &&
!startsWith(github.ref, 'refs/tags')
name: Generate build and test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "20"
cache: "yarn"
- run: yarn install --frozen-lockfile
- run: yarn test
- run: yarn build && yarn run test-dist
- name: Test Report
uses: dorny/test-reporter@v1
if: success() || failure()
with:
name: Mocha Tests
path: "*-report.json"
reporter: mocha-json