diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..1061fc7 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,56 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + +# The workflow only checks out code and runs tests; it never needs write access. +permissions: + contents: read + +jobs: + ci: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4 + + - name: Set up Node.js + uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 + with: + node-version-file: '.nvmrc' + cache: 'npm' + + - name: Set up PHP + uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2 + with: + php-version: '8.3' + + - name: Install dependencies + run: npm ci + + - name: Run tests + run: npm test + + - name: Build production bundle + run: npm run build + + - name: Install Playwright Chromium + run: npx playwright install chromium --with-deps + + - name: Run browser tests + run: npm run test:ui + + - name: Run accessibility modal tests + run: npm run test:accessibility + + - name: Run deploy guard + run: npm run test:deploy-guard + + - name: Run proxy allowlist tests + run: npm run test:proxies + + - name: Scan production bundle for API key/endpoint leaks + run: python3 scripts/scan_bundle_for_leaks.py