Bump micromatch from 4.0.5 to 4.0.8 #128
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: | |
push: | |
branches: [main, master] | |
pull_request: | |
branches: [main, master] | |
jobs: | |
test: | |
timeout-minutes: 60 | |
runs-on: ubuntu-latest | |
container: | |
image: mcr.microsoft.com/playwright:v1.42.0-jammy | |
services: | |
postgres: | |
image: postgres | |
env: | |
POSTGRES_PASSWORD: secret | |
ports: | |
- 5432:5432 | |
# Set health checks to wait until postgres has started | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: Create dummy env file | |
run: cp .env.example .env | |
- name: Install Dependencies | |
run: npm ci | |
- name: Seed Database | |
run: | | |
npx prisma db push | |
# Make sure there are no pending migrations | |
echo "Checking for pending migrations..." | |
npx prisma migrate diff --from-migrations ./prisma/migrations --to-schema-datamodel ./prisma/schema --exit-code --shadow-database-url=${{ env.DATABASE_URL }} | |
echo "Seeding database..." | |
npx prisma db seed | |
- name: Install Playwright Browsers | |
run: npx playwright install --with-deps | |
- name: Start dev server | |
run: npm run dev > /dev/null 2>&1 & | |
- name: Wait for dev server to be ready | |
run: timeout 60s sh -c 'until curl http://localhost:3000 -I; do echo "Waiting for dev server to be running..."; sleep 2; done' | |
- name: Run Playwright tests | |
run: npx playwright test | |
env: | |
HOME: /root | |
- uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: playwright-report | |
path: playwright-report/ | |
retention-days: 30 | |
env: | |
DATABASE_URL: "postgres://postgres:secret@postgres:5432/postgres" | |
UPSTASH_REDIS_REST_URL: ${{ secrets.UPSTASH_REDIS_REST_URL }} | |
UPSTASH_REDIS_REST_TOKEN: ${{ secrets.UPSTASH_REDIS_REST_TOKEN }} |