# Track flaky tests with pytest
pytest --flake-finder --flake-runs=3
# Track flaky tests with pytest
pytest --flake-finder --flake-runs=3
# Track flaky tests with pytest
pytest --flake-finder --flake-runs=3
- name: Detect flaky tests run: | if [ "${{ github.run_attempt }}" -gt 1 ]; then echo "⚠️ Flaky test detected!" exit 1 fi
- name: Detect flaky tests run: | if [ "${{ github.run_attempt }}" -gt 1 ]; then echo "⚠️ Flaky test detected!" exit 1 fi
- name: Detect flaky tests run: | if [ "${{ github.run_attempt }}" -gt 1 ]; then echo "⚠️ Flaky test detected!" exit 1 fi
# Use the exact same image in dev and CI
FROM node:20-alpine AS base
WORKDIR /app
COPY package*.json ./
RUN -weight: 500;">npm ci
COPY . . FROM base AS test
RUN -weight: 500;">npm test FROM base AS build
RUN -weight: 500;">npm run build
# Use the exact same image in dev and CI
FROM node:20-alpine AS base
WORKDIR /app
COPY package*.json ./
RUN -weight: 500;">npm ci
COPY . . FROM base AS test
RUN -weight: 500;">npm test FROM base AS build
RUN -weight: 500;">npm run build
# Use the exact same image in dev and CI
FROM node:20-alpine AS base
WORKDIR /app
COPY package*.json ./
RUN -weight: 500;">npm ci
COPY . . FROM base AS test
RUN -weight: 500;">npm test FROM base AS build
RUN -weight: 500;">npm run build
-weight: 500;">docker build --target test -t app:test .
-weight: 500;">docker run app:test
-weight: 500;">docker build --target test -t app:test .
-weight: 500;">docker run app:test
-weight: 500;">docker build --target test -t app:test .
-weight: 500;">docker run app:test
-weight: 500;">docker compose up # Same image, same deps, same everything
-weight: 500;">docker compose up # Same image, same deps, same everything
-weight: 500;">docker compose up # Same image, same deps, same everything
jobs: lint: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - run: -weight: 500;">npm run lint unit-tests: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - run: -weight: 500;">npm test -- --coverage build: needs: [lint, unit-tests] runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - run: -weight: 500;">npm run build
jobs: lint: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - run: -weight: 500;">npm run lint unit-tests: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - run: -weight: 500;">npm test -- --coverage build: needs: [lint, unit-tests] runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - run: -weight: 500;">npm run build
jobs: lint: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - run: -weight: 500;">npm run lint unit-tests: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - run: -weight: 500;">npm test -- --coverage build: needs: [lint, unit-tests] runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - run: -weight: 500;">npm run build
# .github/dependabot.yml
version: 2
updates: - package-ecosystem: "-weight: 500;">npm" directory: "/" schedule: interval: "weekly" open-pull-requests-limit: 5
# .github/dependabot.yml
version: 2
updates: - package-ecosystem: "-weight: 500;">npm" directory: "/" schedule: interval: "weekly" open-pull-requests-limit: 5
# .github/dependabot.yml
version: 2
updates: - package-ecosystem: "-weight: 500;">npm" directory: "/" schedule: interval: "weekly" open-pull-requests-limit: 5
-weight: 500;">npm audit --audit-level=high --json | jq -e '.vulnerabilities | length == 0'
-weight: 500;">npm audit --audit-level=high --json | jq -e '.vulnerabilities | length == 0'
-weight: 500;">npm audit --audit-level=high --json | jq -e '.vulnerabilities | length == 0'
- name: Deploy to production run: ./deploy.sh # Add this step after deployment:
- name: Verify deployment run: | COMMIT=$(-weight: 500;">curl -s https://api.your-app.com/health | jq -r '.commit_sha') if [ "$COMMIT" != "${{ github.sha }}" ]; then echo "❌ Deployment mismatch!" exit 1 fi
- name: Deploy to production run: ./deploy.sh # Add this step after deployment:
- name: Verify deployment run: | COMMIT=$(-weight: 500;">curl -s https://api.your-app.com/health | jq -r '.commit_sha') if [ "$COMMIT" != "${{ github.sha }}" ]; then echo "❌ Deployment mismatch!" exit 1 fi
- name: Deploy to production run: ./deploy.sh # Add this step after deployment:
- name: Verify deployment run: | COMMIT=$(-weight: 500;">curl -s https://api.your-app.com/health | jq -r '.commit_sha') if [ "$COMMIT" != "${{ github.sha }}" ]; then echo "❌ Deployment mismatch!" exit 1 fi - NPM -weight: 500;">install every time → Use caching. actions/cache with the lockfile hash.
- Full test suite on every commit → Split into unit tests (fast, every push) and integration/E2E (scheduled or on merge).
- Rebuilding Docker images from scratch → Layer caching. Most CI providers support it natively. - Joined May 20, 2026