mirror of
https://github.com/vector-im/element-call.git
synced 2026-09-22 22:29:30 +00:00
41 lines
1.6 KiB
YAML
41 lines
1.6 KiB
YAML
name: Lint, format & type check
|
|
on:
|
|
pull_request: {}
|
|
jobs:
|
|
lint:
|
|
name: Lint, format & type check
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
|
|
with:
|
|
persist-credentials: false
|
|
- name: Enable Corepack
|
|
run: corepack enable
|
|
- name: pnpm cache
|
|
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
|
|
with:
|
|
cache: "pnpm"
|
|
node-version-file: ".node-version"
|
|
- name: Authenticate to GitHub Packages
|
|
# The MatrixRTC SDK (@billcarsonfr/matrix-rtc, see .npmrc) is on the GitHub
|
|
# Packages npm registry, which needs a token with read:packages even for
|
|
# public packages. A workflow's GITHUB_TOKEN only reaches packages of its own
|
|
# repository, so this is a personal access token kept as a repository secret.
|
|
env:
|
|
NPM_REGISTRY_TOKEN: ${{ secrets.MATRIX_RTC_NPM_TOKEN }}
|
|
run: echo "//npm.pkg.github.com/:_authToken=${NPM_REGISTRY_TOKEN}" >> ~/.npmrc
|
|
- name: Install dependencies
|
|
# ignore-pnpmfile should never be commited. Make CI crash if it happened (`pnpmfileChecksum` is present)
|
|
run: "pnpm install --frozen-lockfile --ignore-pnpmfile"
|
|
- name: Formatting
|
|
run: "pnpm run format:check"
|
|
- name: i18n
|
|
run: "pnpm run i18n:check"
|
|
- name: Lint
|
|
run: "pnpm run lint:oxlint"
|
|
- name: Type check
|
|
run: "pnpm run lint:types"
|
|
- name: Dead code analysis
|
|
run: "pnpm run lint:knip"
|