cache/.github/workflows/cache.yml

34 lines
719 B
YAML

name: Cache
on:
pull_request:
branches:
- master
jobs:
# Build and unit test
build:
runs-on: self-hosted
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: '12.x'
- run: npm install
- run: npm run build
- name: Restore npm cache
uses: ./
with:
path: |
node_modules
dist
~/Desktop/cache-me
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
- name: Prettier Format Check
run: npm run format-check
- name: ESLint Check
run: npm run lint
- name: Build & Test
run: npm run test