2021-08-12 17:45:50 +00:00
|
|
|
name: CI - WebUI
|
2021-03-23 14:20:37 +00:00
|
|
|
|
|
|
|
on: [pull_request, push]
|
|
|
|
|
2023-03-11 19:11:02 +00:00
|
|
|
permissions:
|
|
|
|
security-events: write
|
2023-02-16 08:16:54 +00:00
|
|
|
|
2022-02-25 05:34:28 +00:00
|
|
|
concurrency:
|
2022-03-02 05:26:13 +00:00
|
|
|
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
2022-02-25 05:34:28 +00:00
|
|
|
cancel-in-progress: ${{ github.head_ref != '' }}
|
|
|
|
|
2021-03-23 14:20:37 +00:00
|
|
|
jobs:
|
2021-08-19 03:21:34 +00:00
|
|
|
ci:
|
|
|
|
name: Check
|
2021-08-12 17:55:43 +00:00
|
|
|
runs-on: ubuntu-latest
|
2021-08-19 03:21:34 +00:00
|
|
|
|
2021-03-23 14:20:37 +00:00
|
|
|
defaults:
|
|
|
|
run:
|
|
|
|
working-directory: src/webui/www
|
|
|
|
|
|
|
|
steps:
|
2021-08-14 06:54:15 +00:00
|
|
|
- name: Checkout repository
|
2023-09-05 11:42:07 +00:00
|
|
|
uses: actions/checkout@v4
|
2021-03-23 14:20:37 +00:00
|
|
|
|
2021-08-14 06:54:15 +00:00
|
|
|
- name: Setup nodejs
|
2022-02-27 04:49:38 +00:00
|
|
|
uses: actions/setup-node@v3
|
2021-08-12 17:49:47 +00:00
|
|
|
with:
|
2021-08-13 03:05:28 +00:00
|
|
|
node-version: 'lts/*'
|
2021-03-23 14:20:37 +00:00
|
|
|
|
2021-08-14 06:54:15 +00:00
|
|
|
- name: Install tools
|
2021-08-12 17:49:47 +00:00
|
|
|
run: npm install
|
2021-03-23 14:20:37 +00:00
|
|
|
|
2021-08-14 06:54:15 +00:00
|
|
|
- name: Lint code
|
2021-08-12 17:49:47 +00:00
|
|
|
run: npm run lint
|
2021-03-23 14:20:37 +00:00
|
|
|
|
2021-08-14 06:54:15 +00:00
|
|
|
- name: Format code
|
2021-08-12 17:49:47 +00:00
|
|
|
run: |
|
|
|
|
npm run format
|
|
|
|
git diff --exit-code
|
2023-03-11 19:11:02 +00:00
|
|
|
|
|
|
|
- name: Initialize CodeQL
|
|
|
|
uses: github/codeql-action/init@v2
|
|
|
|
with:
|
|
|
|
config-file: ./.github/workflows/helper/codeql/js.yaml
|
|
|
|
languages: javascript
|
|
|
|
|
|
|
|
- name: Run CodeQL analysis
|
|
|
|
uses: github/codeql-action/analyze@v2
|