chore(deps): update dependency i18next to v26.3.6 #2817
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| pull_request: | |
| branches: [main] | |
| push: | |
| branches: [main] | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
| jobs: | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | |
| - uses: ./.github/actions/setup-pnpm | |
| - name: Check formatting | |
| run: pnpm format | |
| - name: Lint (zero warnings) | |
| run: pnpm lint | |
| - name: LOC ceilings (max-lines from repo root) | |
| run: pnpm lint:loc | |
| typecheck: | |
| name: Typecheck | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | |
| - uses: ./.github/actions/setup-pnpm | |
| - name: Typecheck | |
| run: pnpm typecheck | |
| - name: Types SoT parity gate | |
| run: pnpm types:check-sot | |
| test: | |
| name: Tests (coverage) | |
| runs-on: ubuntu-latest | |
| services: | |
| postgres: | |
| image: postgres:18@sha256:c5bd032fb659503bf121faf5cea5894dcfece30286a3db59e3c060f3e9f60cb0 | |
| env: | |
| POSTGRES_DB: pluralscape_test | |
| POSTGRES_USER: postgres | |
| POSTGRES_PASSWORD: postgres | |
| ports: | |
| - 5432:5432 | |
| options: >- | |
| --health-cmd="pg_isready -U postgres" | |
| --health-interval=5s | |
| --health-timeout=5s | |
| --health-retries=5 | |
| valkey: | |
| image: valkey/valkey:9@sha256:8436e10bc65c94886a91d4415b6a6dfa9cb5a306fb3b996e5bb67cd2b4854193 | |
| ports: | |
| - 6379:6379 | |
| options: >- | |
| --health-cmd="valkey-cli ping" | |
| --health-interval=5s | |
| --health-timeout=5s | |
| --health-retries=5 | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | |
| - uses: ./.github/actions/setup-pnpm | |
| - name: Run all tests with coverage | |
| env: | |
| TEST_VALKEY_PORT: "6379" | |
| run: pnpm test:coverage | |
| - name: Upload coverage report | |
| if: always() | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7 | |
| with: | |
| name: coverage-report | |
| path: coverage/ | |
| retention-days: 14 | |
| - name: Extract coverage data | |
| if: github.ref == 'refs/heads/main' | |
| id: coverage-data | |
| run: | | |
| PCT=$(jq '.total.lines.pct' coverage/coverage-summary.json) | |
| echo "pct=$PCT" >> "$GITHUB_OUTPUT" | |
| echo "message=${PCT}%" >> "$GITHUB_OUTPUT" | |
| - name: Update coverage badge | |
| if: github.ref == 'refs/heads/main' | |
| uses: schneegans/dynamic-badges-action@0e50b8bad39e7e1afd3e4e9c2b7dd145fad07501 # v1.8.0 | |
| with: | |
| auth: ${{ secrets.GIST_TOKEN }} | |
| gistID: b29472c169f6d431acf2b24a60a33225 | |
| filename: coverage.json | |
| label: coverage | |
| message: ${{ steps.coverage-data.outputs.message }} | |
| valColorRange: ${{ steps.coverage-data.outputs.pct }} | |
| minColorRange: 50 | |
| maxColorRange: 89 | |
| migrations: | |
| name: Migration Freshness | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | |
| - uses: ./.github/actions/setup-pnpm | |
| - name: Generate migrations | |
| working-directory: packages/db | |
| run: | | |
| pnpm db:generate:pg | |
| pnpm db:generate:sqlite | |
| - name: Check for uncommitted migration changes | |
| run: | | |
| if [ -n "$(git diff --name-only packages/db/migrations/)" ]; then | |
| echo "::error::Migrations are out of date. Run 'pnpm db:generate:pg && pnpm db:generate:sqlite' in packages/db/ and commit the results." | |
| git diff packages/db/migrations/ | |
| exit 1 | |
| fi | |
| - name: Regenerate Crowdin glossary JSON schema | |
| run: | | |
| pnpm crowdin:schema | |
| pnpm exec prettier --write scripts/crowdin-glossary.schema.json | |
| - name: Check for uncommitted glossary-schema changes | |
| run: | | |
| if [ -n "$(git diff --name-only scripts/crowdin-glossary.schema.json)" ]; then | |
| echo "::error::scripts/crowdin-glossary.schema.json is out of date. Run 'pnpm crowdin:schema && pnpm format:fix scripts/crowdin-glossary.schema.json' and commit the result." | |
| git diff scripts/crowdin-glossary.schema.json | |
| exit 1 | |
| fi | |
| security: | |
| name: Security Audit | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | |
| - uses: ./.github/actions/setup-pnpm | |
| - name: Audit dependencies | |
| run: pnpm audit --audit-level=moderate --ignore-registry-errors | |
| openapi: | |
| name: OpenAPI Spec Reconciliation | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | |
| - uses: ./.github/actions/setup-pnpm | |
| - name: Check spec matches code routes | |
| run: pnpm openapi:check | |
| trpc-parity: | |
| name: tRPC Parity Check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | |
| - uses: ./.github/actions/setup-pnpm | |
| - name: Check tRPC parity with REST | |
| run: pnpm trpc:parity | |
| scope-check: | |
| name: Scope Coverage Check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | |
| - uses: ./.github/actions/setup-pnpm | |
| - name: Check scope coverage | |
| run: pnpm scope:check | |
| test-e2e: | |
| name: E2E Tests | |
| needs: [lint, typecheck] | |
| runs-on: ubuntu-latest | |
| services: | |
| postgres: | |
| image: postgres:18@sha256:c5bd032fb659503bf121faf5cea5894dcfece30286a3db59e3c060f3e9f60cb0 | |
| env: | |
| POSTGRES_DB: pluralscape_e2e | |
| POSTGRES_USER: postgres | |
| POSTGRES_PASSWORD: postgres | |
| ports: | |
| - 5432:5432 | |
| options: >- | |
| --health-cmd="pg_isready -U postgres" | |
| --health-interval=5s | |
| --health-timeout=5s | |
| --health-retries=5 | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | |
| - uses: ./.github/actions/setup-pnpm | |
| - uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2 | |
| - name: Install Playwright browsers (mobile-web-e2e) | |
| run: pnpm --filter @pluralscape/mobile-web-e2e exec playwright install --with-deps chromium | |
| - name: Run E2E tests | |
| env: | |
| E2E_DATABASE_URL: postgres://postgres:postgres@localhost:5432/pluralscape_e2e | |
| run: set -o pipefail && pnpm test:e2e | tee e2e-output.txt | |
| - name: Run slow E2E tests | |
| env: | |
| E2E_DATABASE_URL: postgres://postgres:postgres@localhost:5432/pluralscape_e2e | |
| E2E_WORKERS: "1" | |
| run: set -o pipefail && pnpm test:e2e:slow | tee e2e-slow-output.txt | |
| - name: Run SP import E2E tests | |
| run: set -o pipefail && pnpm test:e2e:sp-import | tee e2e-sp-import-output.txt | |
| - name: Run PK import E2E tests | |
| run: set -o pipefail && pnpm test:e2e:pk-import | tee e2e-pk-import-output.txt | |
| - name: Run mobile web E2E tests (OPFS driver) | |
| env: | |
| CI: "true" | |
| run: set -o pipefail && pnpm test:e2e:web | tee e2e-web-output.txt | |
| - name: Extract E2E test count | |
| if: github.ref == 'refs/heads/main' | |
| id: e2e-data | |
| run: | | |
| E2E_COUNT=$(grep -oP '\d+(?= passed)' e2e-output.txt | tail -1) | |
| SLOW_COUNT=$(grep -oP '\d+(?= passed)' e2e-slow-output.txt | tail -1) | |
| SP_COUNT=$(grep -oP '\d+(?= passed)' e2e-sp-import-output.txt | tail -1) | |
| PK_COUNT=$(grep -oP '\d+(?= passed)' e2e-pk-import-output.txt | tail -1) | |
| WEB_COUNT=$(grep -oP '\d+(?= passed)' e2e-web-output.txt | tail -1) | |
| TOTAL=$(( ${E2E_COUNT:-0} + ${SLOW_COUNT:-0} + ${SP_COUNT:-0} + ${PK_COUNT:-0} + ${WEB_COUNT:-0} )) | |
| echo "count=$TOTAL" >> "$GITHUB_OUTPUT" | |
| echo "message=${TOTAL} passed" >> "$GITHUB_OUTPUT" | |
| - name: Update E2E tests badge | |
| if: github.ref == 'refs/heads/main' | |
| uses: schneegans/dynamic-badges-action@0e50b8bad39e7e1afd3e4e9c2b7dd145fad07501 # v1.8.0 | |
| with: | |
| auth: ${{ secrets.GIST_TOKEN }} | |
| gistID: b29472c169f6d431acf2b24a60a33225 | |
| filename: e2e-tests.json | |
| label: E2E tests | |
| message: ${{ steps.e2e-data.outputs.message }} | |
| color: brightgreen |