chore(deps): bump the non-critical group across 1 directory with 20 updates #417
Workflow file for this run
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 | |
| env: | |
| CARGO_TERM_COLOR: always | |
| RUST_BACKTRACE: 1 | |
| jobs: | |
| # ── Rust smart-contract ──────────────────────────────────────────────────── | |
| rust-fmt: | |
| name: Rust fmt | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: rustfmt | |
| - run: cargo fmt --check | |
| rust-clippy: | |
| name: Rust clippy | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: clippy | |
| - uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| target | |
| key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }} | |
| restore-keys: ${{ runner.os }}-cargo- | |
| - run: cargo clippy -- -D warnings | |
| rust-test: | |
| name: Rust tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| target | |
| key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }} | |
| restore-keys: ${{ runner.os }}-cargo- | |
| - run: cargo test --verbose | |
| # ── TypeScript type checking ─────────────────────────────────────────────── | |
| backend-typecheck: | |
| name: Backend typecheck | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20.x | |
| cache: npm | |
| - run: npm ci | |
| - run: npm run typecheck | |
| working-directory: backend | |
| api-typecheck: | |
| name: API typecheck | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20.x | |
| cache: npm | |
| - run: npm ci | |
| - run: npm run typecheck | |
| working-directory: api | |
| frontend-typecheck: | |
| name: Frontend typecheck | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20.x | |
| cache: npm | |
| - run: npm ci | |
| - run: npm run typecheck | |
| working-directory: frontend | |
| # ── Backend (Node.js / TypeScript) ───────────────────────────────────────── | |
| backend-lint: | |
| name: Backend lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20.x | |
| cache: npm | |
| - run: npm ci | |
| - run: npm run lint | |
| working-directory: backend | |
| backend-test: | |
| name: Backend tests | |
| runs-on: ubuntu-latest | |
| services: | |
| postgres: | |
| image: postgres:15 | |
| env: | |
| POSTGRES_USER: postgres | |
| POSTGRES_PASSWORD: postgres | |
| POSTGRES_DB: swiftremit_test | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| ports: | |
| - 5432:5432 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20.x | |
| cache: npm | |
| - run: npm ci | |
| - name: Run migrations | |
| working-directory: backend | |
| env: | |
| DATABASE_URL: postgresql://postgres:postgres@localhost:5432/swiftremit_test | |
| run: psql $DATABASE_URL -f migrations/webhook_schema.sql | |
| - run: npm test | |
| working-directory: backend | |
| env: | |
| DATABASE_URL: postgresql://postgres:postgres@localhost:5432/swiftremit_test | |
| NODE_ENV: test | |
| # ── API (Node.js / TypeScript) ───────────────────────────────────────────── | |
| api-lint: | |
| name: API lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20.x | |
| cache: npm | |
| - run: npm ci | |
| - run: npm run lint || echo "Linter not configured yet" | |
| working-directory: api | |
| api-test: | |
| name: API tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20.x | |
| cache: npm | |
| - run: npm ci | |
| - run: npm test | |
| working-directory: api | |
| # -- Frontend coverage -- | |
| frontend-lint: | |
| name: Frontend lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20.x | |
| cache: npm | |
| - run: npm ci | |
| - run: npm run lint | |
| working-directory: frontend | |
| frontend-coverage: | |
| name: Frontend coverage (vitest >= 95%) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20.x | |
| cache: npm | |
| - run: npm ci | |
| - name: Run vitest coverage (enforce 95% gate) | |
| run: npm run test:coverage | |
| working-directory: frontend | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| files: frontend/coverage/lcov.info | |
| flags: frontend | |
| fail_ci_if_error: false | |
| - name: Upload coverage HTML artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: frontend-coverage-report | |
| path: frontend/coverage/ | |
| retention-days: 14 | |
| # ── Mobile (React Native / Expo) ────────────────────────────────────────── | |
| mobile-test: | |
| name: Mobile tests + coverage (≥ 70%) | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: mobile | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20.x | |
| cache: npm | |
| cache-dependency-path: package-lock.json | |
| - name: Install dependencies | |
| run: npm ci | |
| working-directory: . | |
| - name: Run Jest with coverage | |
| run: npm run test:coverage -- --ci --reporters=default --reporters=jest-junit | |
| env: | |
| CI: true | |
| JEST_JUNIT_OUTPUT_DIR: ./test-results | |
| JEST_JUNIT_OUTPUT_NAME: mobile-junit.xml | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| files: mobile/coverage/lcov.info | |
| flags: mobile | |
| fail_ci_if_error: false | |
| - name: Upload coverage HTML artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: mobile-coverage-report | |
| path: mobile/coverage/ | |
| retention-days: 14 | |
| - name: Upload test results artifact | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: mobile-test-results | |
| path: mobile/test-results/ | |
| retention-days: 14 | |
| # ── SDK browser bundle size check ───────────────────────────────────────── | |
| sdk-bundle-size: | |
| name: SDK browser bundle size (warn > 100 KB gzip) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20.x | |
| cache: npm | |
| - run: npm ci | |
| - run: npm run build | |
| working-directory: sdk | |
| - name: Check gzipped browser bundle size | |
| working-directory: sdk | |
| run: | | |
| FILE="dist/browser/index.mjs" | |
| if [ ! -f "$FILE" ]; then | |
| echo "::warning::Browser bundle not found at $FILE" | |
| exit 0 | |
| fi | |
| SIZE=$(gzip -c "$FILE" | wc -c) | |
| SIZE_KB=$(echo "scale=1; $SIZE / 1024" | bc) | |
| echo "Browser bundle gzipped size: ${SIZE_KB} KB" | |
| if [ "$SIZE" -gt 102400 ]; then | |
| echo "::warning file=$FILE::Browser bundle is ${SIZE_KB} KB gzipped — exceeds 100 KB budget" | |
| else | |
| echo "✅ Bundle size ${SIZE_KB} KB gzipped is within 100 KB budget" | |
| fi | |
| # ── Helm chart lint ──────────────────────────────────────────────────────── | |
| helm-lint: | |
| name: Helm chart lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Helm | |
| uses: azure/setup-helm@v4 | |
| with: | |
| version: "3.17.0" | |
| - name: Lint chart (default values) | |
| run: helm lint charts/swiftremit | |
| - name: Lint chart (dev values) | |
| run: helm lint charts/swiftremit -f charts/swiftremit/values.dev.yaml | |
| - name: Lint chart (staging values) | |
| run: helm lint charts/swiftremit -f charts/swiftremit/values.staging.yaml | |
| - name: Lint chart (production values) | |
| run: helm lint charts/swiftremit -f charts/swiftremit/values.production.yaml | |
| # ── SDK contract-surface coverage ────────────────────────────────────────── | |
| sdk-contract-coverage: | |
| name: SDK contract-surface coverage | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Fail on contract functions with no SDK binding or exclusion | |
| run: node sdk/scripts/check-contract-coverage.mjs | |
| # ── Summary gate ─────────────────────────────────────────────────────────── | |
| ci: | |
| name: CI | |
| runs-on: ubuntu-latest | |
| needs: | |
| - rust-fmt | |
| - rust-clippy | |
| - rust-test | |
| - backend-typecheck | |
| - backend-lint | |
| - backend-test | |
| - api-typecheck | |
| - api-lint | |
| - api-test | |
| - frontend-typecheck | |
| - frontend-lint | |
| - frontend-coverage | |
| - mobile-test | |
| - sdk-bundle-size | |
| - sdk-contract-coverage | |
| - helm-lint | |
| if: always() | |
| steps: | |
| - name: Check all jobs | |
| run: | | |
| results="${{ join(needs.*.result, ' ') }}" | |
| for r in $results; do | |
| if [[ "$r" == "failure" || "$r" == "cancelled" ]]; then | |
| echo "❌ CI failed" | |
| exit 1 | |
| fi | |
| done | |
| echo "✅ CI passed" |