2020-09-20 09:15:59 +00:00
|
|
|
name: Test docsify
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
test:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@master
|
|
|
|
|
|
|
|
- name: Install Node.js
|
2020-12-16 10:09:08 +00:00
|
|
|
uses: actions/setup-node@v2
|
2020-09-20 09:15:59 +00:00
|
|
|
with:
|
|
|
|
node-version: 12
|
|
|
|
|
|
|
|
- name: Get yarn cache
|
|
|
|
working-directory: build/docsify
|
|
|
|
id: yarn-cache
|
|
|
|
run: echo "::set-output name=dir::$(yarn cache dir)"
|
2020-10-20 18:06:24 +00:00
|
|
|
- uses: actions/cache@v2
|
2020-09-20 09:15:59 +00:00
|
|
|
with:
|
|
|
|
path: ${{ steps.yarn-cache.outputs.dir }}
|
|
|
|
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-yarn-
|
|
|
|
|
|
|
|
- run: yarn install --frozen-lockfile
|
|
|
|
working-directory: build/docsify
|
2020-11-27 12:58:25 +00:00
|
|
|
- run: yarn lint:ci
|
|
|
|
working-directory: build/docsify
|
2020-09-20 09:15:59 +00:00
|
|
|
- run: yarn test
|
|
|
|
working-directory: build/docsify
|