-
-
Notifications
You must be signed in to change notification settings - Fork 43
34 lines (33 loc) · 913 Bytes
/
test.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
name: test
on:
pull_request:
push:
jobs:
test:
strategy:
fail-fast: false
matrix:
platform: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.platform }}
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version-file: "package.json"
cache: npm
- name: Install Dependencies
run: npm ci
- name: Run Test
run: npm run test
- name: Ensure dist/ folder is up-to-date
if: ${{ runner.os == 'Linux' }}
shell: bash
run: |
npm run package
if [ "$(git diff --ignore-space-at-eol | wc -l)" -gt "0" ]; then
echo "Detected uncommitted changes after build. See status below:"
git diff
exit 1
fi