Advanced CategoriesFilter #223
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: CI | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
ci: | |
timeout-minutes: 60 | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [22.x] | |
services: | |
postgres: | |
image: postgres | |
env: | |
POSTGRES_PASSWORD: postgres | |
ports: | |
- 5432:5432 | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
env: | |
DATABASE_URL: postgresql://postgres:postgres@localhost | |
NODE_ENV: "development" | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: npm | |
- name: Install dependencies | |
run: npm install | |
- name: Install playwright browsers | |
run: npx playwright install --with-deps | |
- name: Prepare database | |
run: npm run db:migrate | |
- name: Run CI | |
run: npm run ci | |
env: | |
# During e2e tests dev server is setup to run on port 3100, | |
# see playwright.config.ts | |
NEXTAUTH_URL: http://localhost:3100 | |
- name: Upload Playwright report | |
uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: playwright-report | |
path: playwright-report/ | |
retention-days: 30 |