Skip to content

fix(settings): validate language against supported locales #587

fix(settings): validate language against supported locales

fix(settings): validate language against supported locales #587

Workflow file for this run

name: Branch Protection
on:
pull_request:
branches:
- main
- develop
jobs:
quality-checks:
runs-on: ubuntu-latest
name: Type Check, Lint & Validation
steps:
- uses: actions/checkout@v4
- name: Set up pnpm
uses: pnpm/action-setup@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'pnpm'
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Run Type Check
run: pnpm run type-check
- name: Run Lint
run: pnpm run lint
- name: Validate UI
run: pnpm run validate:ui
- name: Validate Web3
run: pnpm run validate:web3
build:
runs-on: ubuntu-latest
needs: [quality-checks]
steps:
- uses: actions/checkout@v4
- name: Set up pnpm
uses: pnpm/action-setup@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'pnpm'
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Run Build
run: pnpm run build
env:
NEXT_PUBLIC_STARKNET_NETWORK: goerli-alpha
- name: Verify Build Output
run: |
if [ -f .next/build-manifest.json ]; then
echo "✅ Build completed successfully"
else
echo "❌ Build failed - no manifest found"
exit 1
fi
test:
runs-on: ubuntu-latest
needs: [build]
steps:
- uses: actions/checkout@v4
- name: Set up pnpm
uses: pnpm/action-setup@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'pnpm'
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Run Tests with Coverage
# Generates: coverage/lcov.info (→ Codecov)
# coverage/coverage-final.json (→ tooling)
# Exits non-zero when any configured threshold is breached.
run: pnpm vitest run --coverage --reporter=json --reporter=lcov
- name: Upload coverage reports to Codecov
# Requires a repository secret named CODECOV_TOKEN.
# Add it at: GitHub → Settings → Secrets → Actions → New repository secret.
# Obtain the token from https://codecov.io after connecting the repository.
# continue-on-error keeps the workflow green while the secret is absent.
uses: codecov/codecov-action@v4
continue-on-error: true
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage/lcov.info
fail_ci_if_error: false
- name: Upload coverage artefact
# Preserves the full coverage directory for offline inspection regardless
# of whether Codecov upload succeeds.
uses: actions/upload-artifact@v4
with:
name: coverage-report
path: coverage/
retention-days: 14