reduce max duration to 60 #314
Workflow file for this run
This file contains 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: E2E Tests on pull request to main | |
on: | |
pull_request: | |
branches: [main] | |
env: | |
CI: true | |
NEXT_PUBLIC_ENV: "development" | |
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }} | |
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} | |
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} | |
STRIPE_API_KEY: ${{secrets.STRIPE_API_KEY}} | |
jobs: | |
playwright-tests: | |
timeout-minutes: 30 | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup Node.js environment | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 22.12.0 | |
cache: "npm" | |
- name: Install dependencies | |
run: npm install -D | |
- name: Install vercel cli | |
run: npm install --global vercel@latest | |
- name: Pull Vercel preview environment | |
run: vercel env pull --yes .env.ci --environment=preview --git-branch=${{ github.head_ref }} --token=${{ secrets.VERCEL_TOKEN }} | |
- name: Install Stripe CLI | |
run: | | |
curl -s https://packages.stripe.dev/api/security/keypair/stripe-cli-gpg/public | gpg --dearmor | sudo tee /usr/share/keyrings/stripe.gpg | |
echo "deb [signed-by=/usr/share/keyrings/stripe.gpg] https://packages.stripe.dev/stripe-cli-debian-local stable main" | sudo tee -a /etc/apt/sources.list.d/stripe.list | |
sudo apt update | |
sudo apt upgrade | |
sudo apt install stripe | |
- name: Drizzle push to db branch | |
run: npm run db:push | |
- name: Install Playwright Browsers | |
run: npm run e2e:install | |
- name: Run Playwright tests | |
run: npm run e2e:ci |