Update X402_Sensory-Bridge.js #249
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: Deploy Application | ||
|
Check failure on line 1 in .github/workflows/playwright.yml
|
||
| on: | ||
| push: | ||
| branches: [main] | ||
| pull_request: | ||
| branches: [main] | ||
| jobs: | ||
| test-and-deploy: | ||
| timeout-minutes: 30 | ||
| runs-on: ubuntu-latest | ||
| env: | ||
| AUTH_SECRET: ${{ secrets.AUTH_SECRET }} | ||
| POSTGRES_URL: ${{ secrets.POSTGRES_URL }} | ||
| BLOB_READ_WRITE_TOKEN: ${{ secrets.BLOB_READ_WRITE_TOKEN }} | ||
| REDIS_URL: ${{ secrets.REDIS_URL }} | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v3 | ||
| - name: Setup Node.js | ||
| uses: actions/setup-node@v3 | ||
| with: | ||
| node-version: '18' | ||
| cache: 'npm' | ||
| - name: Install dependencies | ||
| run: npm ci | ||
| - name: Run tests | ||
| run: npm test | ||
| env: | ||
| CI: true | ||
| - name: Build application | ||
| run: npm run build | ||
| - name: Deploy to production | ||
| run: npm run deploy | ||
| name: Playwright Tests | ||
| on: | ||
| push: | ||
| branches: [main, master] | ||
| pull_request: | ||
| branches: [main, master] | ||
| jobs: | ||
| test: | ||
| timeout-minutes: 30 | ||
| runs-on: ubuntu-latest | ||
| env: | ||
| AUTH_SECRET: ${{ secrets.AUTH_SECRET }} | ||
| POSTGRES_URL: ${{ secrets.POSTGRES_URL }} | ||
| BLOB_READ_WRITE_TOKEN: ${{ secrets.BLOB_READ_WRITE_TOKEN }} | ||
| REDIS_URL: ${{ secrets.REDIS_URL }} | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 1 | ||
| - uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: lts/* | ||
| - name: Install pnpm | ||
| uses: pnpm/action-setup@v2 | ||
| with: | ||
| version: latest | ||
| run_install: false | ||
| - name: Get pnpm store directory | ||
| id: pnpm-cache | ||
| shell: bash | ||
| run: | | ||
| echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT | ||
| - uses: actions/cache@v3 | ||
| with: | ||
| path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} | ||
| key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-pnpm-store- | ||
| - uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: lts/* | ||
| cache: "pnpm" | ||
| - name: Install dependencies | ||
| run: pnpm install --frozen-lockfile | ||
| - name: Cache Playwright browsers | ||
| uses: actions/cache@v3 | ||
| id: playwright-cache | ||
| with: | ||
| path: ~/.cache/ms-playwright | ||
| key: ${{ runner.os }}-playwright-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
| - name: Install Playwright Browsers | ||
| if: steps.playwright-cache.outputs.cache-hit != 'true' | ||
| run: pnpm exec playwright install --with-deps chromium | ||
| - name: Run Playwright tests | ||
| run: pnpm test | ||
| - uses: actions/upload-artifact@v4 | ||
| if: always() && !cancelled() | ||
| with: | ||
| name: playwright-report | ||
| path: playwright-report/ | ||
| retention-days: 7 | ||