66 pull_request :
77 branches : ['main']
88
9+ env :
10+ POSTGRES_PRISMA_URL : postgresql://postgres:1234@localhost
11+ POSTGRES_URL_NON_POOLING : postgresql://postgres:1234@localhost
12+ NEXT_PUBLIC_DEFAULT_CURRENCY_CODE : USD
13+
914jobs :
1015 checks :
1116 runs-on : ubuntu-24.04-arm
12- env :
13- POSTGRES_PRISMA_URL : postgresql://postgres:1234@localhost
14- POSTGRES_URL_NON_POOLING : postgresql://postgres:1234@localhost
15- NEXT_PUBLIC_DEFAULT_CURRENCY_CODE : USD
16-
1717 services :
1818 postgres :
1919 image : postgres:15
6262 run : npm run test
6363
6464 - name : Build
65- run : npm run build
65+ run : npm run build
66+
67+ - name : Upload build artifacts
68+ uses : actions/upload-artifact@v4
69+ with :
70+ name : nextjs-build
71+ path : .next
72+
73+ playwright :
74+ timeout-minutes : 60
75+ runs-on : ubuntu-24.04-arm
76+ strategy :
77+ fail-fast : false
78+ matrix :
79+ browser : [chromium, firefox, webkit]
80+
81+ services :
82+ postgres :
83+ image : postgres:15
84+ env :
85+ POSTGRES_USER : postgres
86+ POSTGRES_PASSWORD : 1234
87+ POSTGRES_DB : test_db
88+ ports :
89+ - 5432:5432
90+ # Wait for postgres to be ready
91+ options : >-
92+ --health-cmd pg_isready
93+ --health-interval 10s
94+ --health-timeout 5s
95+ --health-retries 5
96+
97+ steps :
98+ - name : Check out repository
99+ uses : actions/checkout@v6
100+
101+ - name : Set up Node.js
102+ uses : actions/setup-node@v6
103+ with :
104+ node-version : 24
105+ cache : ' npm'
106+
107+ - name : Install dependencies
108+ run : npm ci
109+
110+ - name : Download build artifacts
111+ uses : actions/download-artifact@v6
112+ with :
113+ name : nextjs-build
114+ path : .next
115+
116+ - name : Run Prisma migrations
117+ run : npm run prisma-migrate
118+
119+ - name : Install Playwright Browsers
120+ run : npx playwright install --with-deps ${{ matrix.browser }}
121+
122+ - name : Start application
123+ run : npm run start &
124+
125+ - name : Run all Playwright tests
126+ run : npx playwright test --project=${{ matrix.browser }}
127+ if : github.event_name == 'pull_request'
128+
129+ - uses : actions/upload-artifact@v4
130+ if : ${{ !cancelled() }}
131+ with :
132+ name : playwright-report
133+ path : playwright-report/
134+ retention-days : 30
0 commit comments