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