|
|
@ -13,6 +13,14 @@ jobs:
|
|
|
|
- uses: actions/setup-node@v1
|
|
|
|
- uses: actions/setup-node@v1
|
|
|
|
with:
|
|
|
|
with:
|
|
|
|
node-version: ${{ matrix.node-version }}
|
|
|
|
node-version: ${{ matrix.node-version }}
|
|
|
|
|
|
|
|
- id: npm-cache-dir
|
|
|
|
|
|
|
|
run: echo "::set-output name=dir::$(npm config get cache)"
|
|
|
|
|
|
|
|
- uses: actions/cache@v2
|
|
|
|
|
|
|
|
id: npm-cache
|
|
|
|
|
|
|
|
with:
|
|
|
|
|
|
|
|
path: ${{ steps.npm-cache-dir.outputs.dir }}
|
|
|
|
|
|
|
|
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
|
|
|
|
|
|
|
restore-keys: ${{ runner.os }}-node-
|
|
|
|
- run: npm install
|
|
|
|
- run: npm install
|
|
|
|
- run: npm test
|
|
|
|
- run: npm test
|
|
|
|
env:
|
|
|
|
env:
|
|
|
@ -23,6 +31,14 @@ jobs:
|
|
|
|
steps:
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
|
|
|
- uses: actions/checkout@v1
|
|
|
|
- uses: actions/setup-node@v1
|
|
|
|
- uses: actions/setup-node@v1
|
|
|
|
|
|
|
|
- id: npm-cache-dir
|
|
|
|
|
|
|
|
run: echo "::set-output name=dir::$(npm config get cache)"
|
|
|
|
|
|
|
|
- uses: actions/cache@v2
|
|
|
|
|
|
|
|
id: npm-cache
|
|
|
|
|
|
|
|
with:
|
|
|
|
|
|
|
|
path: ${{ steps.npm-cache-dir.outputs.dir }}
|
|
|
|
|
|
|
|
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
|
|
|
|
|
|
|
restore-keys: ${{ runner.os }}-node-
|
|
|
|
- run: 'npm i && npm run lint'
|
|
|
|
- run: 'npm i && npm run lint'
|
|
|
|
Unit:
|
|
|
|
Unit:
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
@ -33,4 +49,12 @@ jobs:
|
|
|
|
steps:
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
|
|
|
- uses: actions/checkout@v1
|
|
|
|
- uses: actions/setup-node@v1
|
|
|
|
- uses: actions/setup-node@v1
|
|
|
|
|
|
|
|
- id: npm-cache-dir
|
|
|
|
|
|
|
|
run: echo "::set-output name=dir::$(npm config get cache)"
|
|
|
|
|
|
|
|
- uses: actions/cache@v2
|
|
|
|
|
|
|
|
id: npm-cache
|
|
|
|
|
|
|
|
with:
|
|
|
|
|
|
|
|
path: ${{ steps.npm-cache-dir.outputs.dir }}
|
|
|
|
|
|
|
|
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
|
|
|
|
|
|
|
restore-keys: ${{ runner.os }}-node-
|
|
|
|
- run: 'npm i && npm run test:unit'
|
|
|
|
- run: 'npm i && npm run test:unit'
|
|
|
|