2021-08-13 01:45:50 +08:00
|
|
|
name: CI - WebUI
|
2021-03-23 22:20:37 +08:00
|
|
|
|
|
|
|
on: [pull_request, push]
|
|
|
|
|
2023-03-12 03:11:02 +08:00
|
|
|
permissions:
|
|
|
|
security-events: write
|
2023-02-16 16:16:54 +08:00
|
|
|
|
2022-02-25 13:34:28 +08:00
|
|
|
concurrency:
|
2022-03-02 13:26:13 +08:00
|
|
|
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
2022-02-25 13:34:28 +08:00
|
|
|
cancel-in-progress: ${{ github.head_ref != '' }}
|
|
|
|
|
2021-03-23 22:20:37 +08:00
|
|
|
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
|
2023-09-05 19:42:07 +08:00
|
|
|
uses: actions/checkout@v4
|
2021-03-23 22:20:37 +08:00
|
|
|
|
2021-08-14 14:54:15 +08:00
|
|
|
- name: Setup nodejs
|
2023-11-05 13:31:06 +08:00
|
|
|
uses: actions/setup-node@v4
|
2021-08-13 01:49:47 +08:00
|
|
|
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
|
2023-03-12 03:11:02 +08:00
|
|
|
|
|
|
|
- name: Initialize CodeQL
|
2024-01-02 16:23:09 +08:00
|
|
|
uses: github/codeql-action/init@v3
|
2023-03-12 03:11:02 +08:00
|
|
|
with:
|
2024-03-17 14:56:26 +08:00
|
|
|
config-file: .github/workflows/helper/codeql/js.yaml
|
2023-03-12 03:11:02 +08:00
|
|
|
languages: javascript
|
|
|
|
|
|
|
|
- name: Run CodeQL analysis
|
2024-01-02 16:23:09 +08:00
|
|
|
uses: github/codeql-action/analyze@v3
|