2021-08-13 01:45:50 +08:00
|
|
|
name: CI - WebUI
|
2021-03-23 22:20:37 +08:00
|
|
|
|
|
|
|
on: [pull_request, push]
|
|
|
|
|
|
|
|
jobs:
|
2021-08-19 11:21:34 +08:00
|
|
|
ci:
|
|
|
|
name: Check
|
2021-08-13 01:55:43 +08:00
|
|
|
runs-on: ubuntu-latest
|
2021-08-19 11:21:34 +08:00
|
|
|
|
2021-03-23 22:20:37 +08:00
|
|
|
defaults:
|
|
|
|
run:
|
|
|
|
working-directory: src/webui/www
|
|
|
|
|
|
|
|
steps:
|
2021-08-14 14:54:15 +08:00
|
|
|
- name: Checkout repository
|
2021-08-13 01:49:47 +08:00
|
|
|
uses: actions/checkout@v2
|
2021-03-23 22:20:37 +08:00
|
|
|
|
2021-08-14 14:54:15 +08:00
|
|
|
- name: Setup nodejs
|
2021-08-13 01:49:47 +08:00
|
|
|
uses: actions/setup-node@v2
|
|
|
|
with:
|
2021-08-13 11:05:28 +08:00
|
|
|
node-version: 'lts/*'
|
2021-03-23 22:20:37 +08:00
|
|
|
|
2021-08-14 14:54:15 +08:00
|
|
|
- name: Install tools
|
2021-08-13 01:49:47 +08:00
|
|
|
run: npm install
|
2021-03-23 22:20:37 +08:00
|
|
|
|
2021-08-14 14:54:15 +08:00
|
|
|
- name: Lint code
|
2021-08-13 01:49:47 +08:00
|
|
|
run: npm run lint
|
2021-03-23 22:20:37 +08:00
|
|
|
|
2021-08-14 14:54:15 +08:00
|
|
|
- name: Format code
|
2021-08-13 01:49:47 +08:00
|
|
|
run: |
|
|
|
|
npm run format
|
|
|
|
git diff --exit-code
|