mirror of
https://github.com/webadderallorg/Recordly.git
synced 2026-09-24 23:05:49 +00:00
ci: add pull-request quality checks
This commit is contained in:
@@ -0,0 +1,60 @@
|
||||
name: Code Quality
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened, reopened, synchronize, ready_for_review]
|
||||
push:
|
||||
branches: [main]
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
quality:
|
||||
name: Repository quality
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 20
|
||||
env:
|
||||
CI: true
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
||||
with:
|
||||
node-version: '22'
|
||||
cache: npm
|
||||
cache-dependency-path: package-lock.json
|
||||
|
||||
- name: Install dependencies
|
||||
id: install
|
||||
run: npm ci --ignore-scripts
|
||||
|
||||
- name: Typecheck
|
||||
if: ${{ !cancelled() && steps.install.outcome == 'success' }}
|
||||
run: npx tsc --noEmit
|
||||
|
||||
- name: Lint
|
||||
if: ${{ !cancelled() && steps.install.outcome == 'success' }}
|
||||
run: npm run lint
|
||||
|
||||
- name: Test
|
||||
if: ${{ !cancelled() && steps.install.outcome == 'success' }}
|
||||
run: npm test
|
||||
|
||||
# Main currently has known locale-parity debt covered by PR #710. Keep the
|
||||
# check visible without blocking unrelated PRs; make it required once that
|
||||
# existing translation PR (or an equivalent fix) lands.
|
||||
- name: Check translations (advisory)
|
||||
if: ${{ !cancelled() && steps.install.outcome == 'success' }}
|
||||
continue-on-error: true
|
||||
run: npm run i18n:check
|
||||
Reference in New Issue
Block a user