2022-04-21 15:16:18 +01:00
|
|
|
name: Static Analysis
|
|
|
|
on:
|
2022-12-15 11:00:58 +00:00
|
|
|
pull_request: {}
|
2025-01-17 15:07:04 +01:00
|
|
|
# push:
|
|
|
|
# branches: [develop, master]
|
2024-11-22 10:18:33 +00:00
|
|
|
permissions: {} # No permissions needed
|
2022-04-21 15:16:18 +01:00
|
|
|
jobs:
|
2022-12-15 11:00:58 +00:00
|
|
|
ts_lint:
|
|
|
|
name: "Typescript Syntax Check"
|
2024-10-17 09:46:02 +01:00
|
|
|
runs-on: ubuntu-24.04
|
2022-12-15 11:00:58 +00:00
|
|
|
steps:
|
2024-01-02 17:24:45 +00:00
|
|
|
- uses: actions/checkout@v4
|
2022-12-15 11:00:58 +00:00
|
|
|
|
2024-01-02 17:37:20 +00:00
|
|
|
- uses: actions/setup-node@v4
|
2022-12-15 11:00:58 +00:00
|
|
|
with:
|
2024-01-18 10:10:51 +00:00
|
|
|
node-version-file: package.json
|
2022-12-15 11:00:58 +00:00
|
|
|
cache: "yarn"
|
|
|
|
|
|
|
|
# Does not need branch matching as only analyses this layer
|
|
|
|
- name: Install Deps
|
2023-03-31 16:17:43 +01:00
|
|
|
run: "yarn install --frozen-lockfile"
|
2022-12-15 11:00:58 +00:00
|
|
|
|
|
|
|
- name: Typecheck
|
|
|
|
run: "yarn run lint:types"
|
|
|
|
|
|
|
|
i18n_lint:
|
|
|
|
name: "i18n Check"
|
2023-09-05 17:09:47 +01:00
|
|
|
uses: matrix-org/matrix-web-i18n/.github/workflows/i18n_check.yml@main
|
2024-11-22 10:18:33 +00:00
|
|
|
permissions:
|
|
|
|
pull-requests: read
|
2024-02-29 13:02:44 +00:00
|
|
|
with:
|
|
|
|
hardcoded-words: "Element"
|
2022-12-15 11:00:58 +00:00
|
|
|
|
|
|
|
js_lint:
|
|
|
|
name: "ESLint"
|
2024-10-17 09:46:02 +01:00
|
|
|
runs-on: ubuntu-24.04
|
2022-12-15 11:00:58 +00:00
|
|
|
steps:
|
2024-01-02 17:24:45 +00:00
|
|
|
- uses: actions/checkout@v4
|
2022-12-15 11:00:58 +00:00
|
|
|
|
2024-01-02 17:37:20 +00:00
|
|
|
- uses: actions/setup-node@v4
|
2022-12-15 11:00:58 +00:00
|
|
|
with:
|
2024-01-18 10:10:51 +00:00
|
|
|
node-version-file: package.json
|
2022-12-15 11:00:58 +00:00
|
|
|
cache: "yarn"
|
|
|
|
|
|
|
|
# Does not need branch matching as only analyses this layer
|
|
|
|
- name: Install Deps
|
2023-03-31 16:17:43 +01:00
|
|
|
run: "yarn install --frozen-lockfile"
|
2022-12-15 11:00:58 +00:00
|
|
|
|
|
|
|
- name: Run Linter
|
|
|
|
run: "yarn run lint:js"
|
2023-11-22 16:13:47 +01:00
|
|
|
|
|
|
|
workflow_lint:
|
|
|
|
name: "Workflow Lint"
|
2024-10-17 09:46:02 +01:00
|
|
|
runs-on: ubuntu-24.04
|
2023-11-22 16:13:47 +01:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
|
|
|
|
- uses: actions/setup-node@v4
|
|
|
|
with:
|
2024-01-18 10:10:51 +00:00
|
|
|
node-version-file: package.json
|
2023-11-22 16:13:47 +01:00
|
|
|
cache: "yarn"
|
|
|
|
|
|
|
|
# Does not need branch matching as only analyses this layer
|
|
|
|
- name: Install Deps
|
|
|
|
run: "yarn install --frozen-lockfile"
|
|
|
|
|
|
|
|
- name: Run Linter
|
|
|
|
run: "yarn lint:workflows"
|
2024-01-18 10:10:51 +00:00
|
|
|
|
|
|
|
analyse_dead_code:
|
|
|
|
name: "Analyse Dead Code"
|
2024-10-17 09:46:02 +01:00
|
|
|
runs-on: ubuntu-24.04
|
2024-01-18 10:10:51 +00:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
|
|
|
|
- uses: actions/setup-node@v4
|
|
|
|
with:
|
|
|
|
node-version-file: package.json
|
|
|
|
cache: "yarn"
|
|
|
|
|
|
|
|
- name: Install Deps
|
|
|
|
run: "yarn install --frozen-lockfile"
|
|
|
|
|
|
|
|
- name: Run linter
|
|
|
|
run: "yarn run lint:knip"
|