mirror of
https://github.com/vector-im/element-web.git
synced 2026-03-02 20:12:04 +01:00
* Switch shared-components from yarn classic to pnpm Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Switch element-web from yarn classic to pnpm Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Switch CI to pnpm Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Update docs & comments Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Hold back postcss to match yarn.lock & use workspace protocol Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Tweak CI Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Rid the world of `$(res)` Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Switch to type=module Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Fix module import Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Make knip happy Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Update playwright imports Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Make docker build happy Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Remove stale params Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Fix badly formatted logging Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Switch to lodash-es Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Make jest happier Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Switch element-web to ESM Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Update testcontainers imports Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Fix modernizr cjs Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Fix modernizr cjs ignore files Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Move modernizr sonar exclusion to exclude everything Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Update playwright tests for esm compat Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Add pnpm-link utility Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Test matrix-web-i18n Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Iterate Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Iterate Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Discard changes to src/vector/index.ts * Update playwright-common Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Use catalogs Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Improve pnpm-link script Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Use pnpm import to regenerate lockfile from yarn.lock Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --------- Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
164 lines
5.4 KiB
YAML
164 lines
5.4 KiB
YAML
name: Static Analysis
|
|
on:
|
|
pull_request: {}
|
|
push:
|
|
branches: [develop, master]
|
|
merge_group:
|
|
types: [checks_requested]
|
|
repository_dispatch:
|
|
types: [element-web-notify]
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}
|
|
cancel-in-progress: true
|
|
|
|
env:
|
|
# This must be set for fetchdep.sh to get the right branch
|
|
PR_NUMBER: ${{ github.event.pull_request.number }}
|
|
|
|
permissions: {} # No permissions required
|
|
|
|
jobs:
|
|
ts_lint:
|
|
name: "Typescript Syntax Check"
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
|
|
|
|
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4
|
|
- uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6
|
|
with:
|
|
cache: "pnpm"
|
|
node-version: "lts/*"
|
|
|
|
- name: Install Dependencies
|
|
run: "./scripts/layered.sh"
|
|
|
|
- name: Typecheck
|
|
run: "pnpm run lint:types"
|
|
|
|
- name: Install Shared Component Dependencies
|
|
run: "pnpm --dir packages/shared-components install"
|
|
|
|
- name: Typecheck Shared Components
|
|
run: "pnpm --dir packages/shared-components run lint:types"
|
|
|
|
i18n_lint_ew:
|
|
name: "i18n Check (Element Web)"
|
|
uses: matrix-org/matrix-web-i18n/.github/workflows/i18n_check.yml@3673fd3abbf8dfae1de849c6cd3e69e24ed7a766
|
|
permissions:
|
|
pull-requests: read
|
|
with:
|
|
hardcoded-words: "Element"
|
|
packageManager: pnpm
|
|
allowed-hardcoded-keys: |
|
|
console_dev_note
|
|
labs|element_call_video_rooms
|
|
labs|feature_disable_call_per_sender_encryption
|
|
voip|element_call
|
|
error|invalid_json
|
|
error|misconfigured
|
|
welcome_to_element
|
|
devtools|settings|elementCallUrl
|
|
labs|sliding_sync_description
|
|
|
|
i18n_lint_shared_components:
|
|
name: "i18n Check (Shared Components)"
|
|
uses: matrix-org/matrix-web-i18n/.github/workflows/i18n_check.yml@3673fd3abbf8dfae1de849c6cd3e69e24ed7a766
|
|
permissions:
|
|
pull-requests: read
|
|
with:
|
|
path: "packages/shared-components"
|
|
hardcoded-words: "Element"
|
|
packageManager: pnpm
|
|
|
|
rethemendex_lint:
|
|
name: "Rethemendex Check"
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
|
|
|
|
- run: ./res/css/rethemendex.sh
|
|
|
|
- run: git diff --exit-code
|
|
|
|
js_lint:
|
|
name: "ESLint"
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
|
|
|
|
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4
|
|
- uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6
|
|
with:
|
|
cache: "pnpm"
|
|
node-version: "lts/*"
|
|
|
|
# Does not need branch matching as only analyses this layer
|
|
- name: Install Deps
|
|
run: "pnpm install --frozen-lockfile"
|
|
|
|
- name: Run Linter
|
|
run: "pnpm run lint:js"
|
|
|
|
- name: Install Shared Component Deps
|
|
run: "pnpm --dir packages/shared-components install --frozen-lockfile"
|
|
|
|
- name: Run Linter
|
|
run: "pnpm --dir packages/shared-components run lint:js"
|
|
|
|
style_lint:
|
|
name: "Style Lint"
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
|
|
|
|
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4
|
|
- uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6
|
|
with:
|
|
cache: "pnpm"
|
|
node-version: "lts/*"
|
|
|
|
# Does not need branch matching as only analyses this layer
|
|
- name: Install Deps
|
|
run: "pnpm install"
|
|
|
|
- name: Run Linter
|
|
run: "pnpm run lint:style"
|
|
|
|
workflow_lint:
|
|
name: "Workflow Lint"
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
|
|
|
|
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4
|
|
- uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6
|
|
with:
|
|
cache: "pnpm"
|
|
node-version: "lts/*"
|
|
|
|
# Does not need branch matching as only analyses this layer
|
|
- name: Install Deps
|
|
run: "pnpm install --frozen-lockfile"
|
|
|
|
- name: Run Linter
|
|
run: "pnpm lint:workflows"
|
|
|
|
analyse_dead_code:
|
|
name: "Analyse Dead Code"
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
|
|
|
|
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4
|
|
- uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6
|
|
with:
|
|
cache: "pnpm"
|
|
node-version: "lts/*"
|
|
|
|
- name: Install Deps
|
|
run: "pnpm install --frozen-lockfile"
|
|
|
|
- name: Run linter
|
|
run: "pnpm run lint:knip"
|