element-desktop/.github/workflows/static_analysis.yaml

83 lines
2.2 KiB
YAML
Raw Normal View History

2022-04-21 14:16:18 +00:00
name: Static Analysis
on:
2022-12-15 11:00:58 +00:00
pull_request: {}
push:
branches: [develop, master]
2022-04-21 14:16:18 +00:00
jobs:
2022-12-15 11:00:58 +00:00
ts_lint:
name: "Typescript Syntax Check"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
2022-12-15 11:00:58 +00:00
- uses: actions/setup-node@v4
2022-12-15 11:00:58 +00:00
with:
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
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"
uses: matrix-org/matrix-web-i18n/.github/workflows/i18n_check.yml@main
with:
hardcoded-words: "Element"
2022-12-15 11:00:58 +00:00
js_lint:
name: "ESLint"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
2022-12-15 11:00:58 +00:00
- uses: actions/setup-node@v4
2022-12-15 11:00:58 +00:00
with:
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
run: "yarn install --frozen-lockfile"
2022-12-15 11:00:58 +00:00
- name: Run Linter
run: "yarn run lint:js"
workflow_lint:
name: "Workflow Lint"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: package.json
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"
analyse_dead_code:
name: "Analyse Dead Code"
runs-on: ubuntu-latest
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"