it-tools/.github/workflows/ci.yml

39 lines
759 B
YAML
Raw Normal View History

2022-04-14 05:02:04 +08:00
name: ci
2022-05-11 16:12:21 +08:00
on: [push, pull_request]
2022-04-14 05:02:04 +08:00
jobs:
ci:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master
with:
fetch-depth: 0
- name: Setup node env
uses: actions/setup-node@v3.0.0
with:
node-version: 16
- name: Cache node_modules
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install dependencies
run: npm ci
- name: Run linters
run: npm run lint
- name: Run unit test
run: npm run test
- name: Build the app
run: npm run build