chore: remove commented out code and console logs #145
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: | |
pull_request: | |
jobs: | |
quality: | |
name: π Code Style | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Biome | |
uses: biomejs/setup-biome@v2 | |
with: | |
version: latest | |
- name: Run Quality Checks | |
run: biome ci . | |
test: | |
name: π― Unit Tests | |
runs-on: ubuntu-latest | |
services: | |
db: | |
image: postgres:latest | |
env: | |
POSTGRES_DB: everynewsdb | |
POSTGRES_USER: everynewsusername | |
POSTGRES_PASSWORD: everynewspassword | |
ports: | |
- 54321:5432 | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Bun | |
uses: oven-sh/setup-bun@v2 | |
- name: Install dependencies | |
run: bun i | |
- name: Run Unit Tests | |
env: | |
DATABASE_URL: postgresql://everynewsusername:everynewspassword@localhost:54321/everynewsdb | |
NODE_ENV: test | |
run: bun run test | |
build: | |
name: π¦ Build | |
runs-on: ubuntu-latest | |
services: | |
db: | |
image: postgres:latest | |
env: | |
POSTGRES_DB: everynewsdb | |
POSTGRES_USER: everynewsusername | |
POSTGRES_PASSWORD: everynewspassword | |
ports: | |
- 54321:5432 | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Bun | |
uses: oven-sh/setup-bun@v2 | |
- name: Install dependencies | |
run: bun i | |
- name: Build | |
env: | |
DATABASE_URL: postgresql://everynewsusername:everynewspassword@localhost:54321/everynewsdb | |
run: bun run build | |
playwright: | |
name: π Playwright | |
timeout-minutes: 60 | |
runs-on: ubuntu-latest | |
services: | |
db: | |
image: postgres:latest | |
env: | |
POSTGRES_DB: everynewsdb | |
POSTGRES_USER: everynewsusername | |
POSTGRES_PASSWORD: everynewspassword | |
ports: | |
- 54321:5432 | |
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: lts/* | |
- name: Setup Bun | |
uses: oven-sh/setup-bun@v2 | |
- name: Install dependencies | |
run: bun i | |
- name: Cache Playwright Browsers | |
id: playwright-cache | |
uses: actions/cache@v4 | |
with: | |
path: ~/.cache/ms-playwright | |
key: ${{ runner.os }}-playwright-${{ hashFiles('**/bun.lock') }} | |
restore-keys: | | |
${{ runner.os }}-playwright- | |
- name: Install Playwright Browsers | |
if: steps.playwright-cache.outputs.cache-hit != 'true' | |
run: bunx playwright install --with-deps | |
- name: Run Playwright tests | |
env: | |
DATABASE_URL: postgresql://everynewsusername:everynewspassword@localhost:54321/everynewsdb | |
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY: ${{ secrets.NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY }} | |
CLERK_SECRET_KEY: ${{ secrets.CLERK_SECRET_KEY }} | |
E2E_CLERK_USER_USERNAME: ${{ secrets.E2E_CLERK_USER_USERNAME }} | |
E2E_CLERK_USER_PASSWORD: ${{ secrets.E2E_CLERK_USER_PASSWORD }} | |
run: bun run e2e | |
- uses: actions/upload-artifact@v4 | |
if: ${{ !cancelled() }} | |
with: | |
name: playwright-report | |
path: playwright-report/ | |
retention-days: 30 |