-
Notifications
You must be signed in to change notification settings - Fork 62
55 lines (51 loc) · 2.04 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
47
48
49
50
51
52
53
54
55
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: display env
run: |
npx envinfo --preset playwright
- 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.
# Also skip checking docsify emoji files which may get updated by github API.
if: runner.os != 'Windows'
run: |
cd packages/docsifyjs+docsify/ && git checkout docs/emoji.md src/core/render/emoji-data.js && cd .. && cd ..
git status
git --no-pager diff
git submodule foreach git --no-pager diff
git add .
git diff --quiet && git diff --cached --quiet
env:
CI: true