2021-08-12 20:45:50 +03:00
|
|
|
name: CI - WebUI
|
2021-03-23 17:20:37 +03:00
|
|
|
|
|
|
|
on: [pull_request, push]
|
|
|
|
|
2023-03-11 22:11:02 +03:00
|
|
|
permissions:
|
|
|
|
security-events: write
|
2023-02-16 11:16:54 +03:00
|
|
|
|
2022-02-25 08:34:28 +03:00
|
|
|
concurrency:
|
2022-03-02 08:26:13 +03:00
|
|
|
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
2022-02-25 08:34:28 +03:00
|
|
|
cancel-in-progress: ${{ github.head_ref != '' }}
|
|
|
|
|
2021-03-23 17:20:37 +03:00
|
|
|
jobs:
|
2021-08-19 06:21:34 +03:00
|
|
|
ci:
|
|
|
|
name: Check
|
2021-08-12 20:55:43 +03:00
|
|
|
runs-on: ubuntu-latest
|
2021-08-19 06:21:34 +03:00
|
|
|
|
2021-03-23 17:20:37 +03:00
|
|
|
defaults:
|
|
|
|
run:
|
|
|
|
working-directory: src/webui/www
|
|
|
|
|
|
|
|
steps:
|
2021-08-14 09:54:15 +03:00
|
|
|
- name: Checkout repository
|
2022-03-02 22:39:35 +03:00
|
|
|
uses: actions/checkout@v3
|
2021-03-23 17:20:37 +03:00
|
|
|
|
2021-08-14 09:54:15 +03:00
|
|
|
- name: Setup nodejs
|
2022-02-27 07:49:38 +03:00
|
|
|
uses: actions/setup-node@v3
|
2021-08-12 20:49:47 +03:00
|
|
|
with:
|
2021-08-13 06:05:28 +03:00
|
|
|
node-version: 'lts/*'
|
2021-03-23 17:20:37 +03:00
|
|
|
|
2021-08-14 09:54:15 +03:00
|
|
|
- name: Install tools
|
2021-08-12 20:49:47 +03:00
|
|
|
run: npm install
|
2021-03-23 17:20:37 +03:00
|
|
|
|
2021-08-14 09:54:15 +03:00
|
|
|
- name: Lint code
|
2021-08-12 20:49:47 +03:00
|
|
|
run: npm run lint
|
2021-03-23 17:20:37 +03:00
|
|
|
|
2021-08-14 09:54:15 +03:00
|
|
|
- name: Format code
|
2021-08-12 20:49:47 +03:00
|
|
|
run: |
|
|
|
|
npm run format
|
|
|
|
git diff --exit-code
|
2023-03-11 22:11:02 +03: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
|