-
Notifications
You must be signed in to change notification settings - Fork 57
46 lines (42 loc) · 1.65 KB
/
tests.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
name: tests
on: [push]
jobs:
build:
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: [ubuntu-latest, macos-latest, windows-latest]
steps:
# Ensure that git always checkouts out with LF (to avoid issues in Windows, https://github.com/prettier/prettier/issues/7825#issuecomment-602171740)
- name: Set git to use LF
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- uses: actions/checkout@v1
with:
submodules: 'recursive'
token: ${{ secrets.ACCESS_TOKEN }}
- name: Use Node.js latest LTS
uses: actions/setup-node@v3
with:
node-version: lts/* # Test on the current LTS version.
- name: install
run: |
npm run fresh
- name: check formatting
run: |
npm run prettier:check:all
- name: build
run: |
npm run clean:all
npm run build:all
- name: test
run: |
npm run test:all
- name: check repo is clean
# skip this check in windows for now, as the build outputs may get slightly modified in Windows, which we want to fix.
if: runner.os != 'Windows'
run: |
git status && git submodule foreach git --no-pager diff && git add . && git diff --quiet && git diff --cached --quiet
env:
CI: true