[PR]: Adding commands information in README #10
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: Build & Test | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
ci: | |
timeout-minutes: 60 | |
runs-on: ubuntu-latest | |
steps: | |
# Setup environment (Node and pnpm) | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: lts/* | |
- uses: pnpm/action-setup@v4 | |
with: | |
version: latest | |
# Install dependencies | |
- name: Install dependencies | |
run: pnpm install --no-frozen-lockfile | |
# Run build | |
- name: Build Next.js app | |
run: pnpm run build | |
# Run unit tests | |
- name: Running unit tests | |
run: pnpm run test | |
# Run E2E tests | |
- name: Install Playwright Browsers | |
run: pnpm exec playwright install --with-deps | |
- name: Run Playwright tests | |
run: pnpm exec playwright test | |
env: | |
AUTH_SECRET: some_nextauth_secret | |
TEST_PASSWORD: password | |
- uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: playwright-report | |
path: playwright-report/ | |
retention-days: 30 | |
# Upload coverage to Codecov | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} |