Skip to content

[leaderboard] updated learderboard page with data and table component #29

[leaderboard] updated learderboard page with data and table component

[leaderboard] updated learderboard page with data and table component #29

name: Build / Unit Test
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
strategy:
matrix:
node-version: [20.x, 22.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
name: Build with ${{ matrix.node-version }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: npm
- run: npm ci
env:
DATABASE_URL: ${{ secrets.DATABASE_URL }}
AUTH_TOKEN: ${{ secrets.AUTH_TOKEN }}
SRIPE_WEBHOOK_SECRET: ${{ secrets.SRIPE_WEBHOOK_SECRET}}
STRIPE_SECRET_KEY: ${{ secrets.STRIPE_SECRET_KEY }}
test:
strategy:
matrix:
node-version: [20.x]
name: Run all tests
runs-on: ubuntu-latest
environment: production
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Retrieve Git history, needed to verify commits
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: npm
- run: npm ci
env:
DATABASE_URL: ${{ secrets.DATABASE_URL }}
AUTH_TOKEN: ${{ secrets.AUTH_TOKEN }}
SRIPE_WEBHOOK_SECRET: ${{ secrets.SRIPE_WEBHOOK_SECRET}}
STRIPE_SECRET_KEY: ${{ secrets.STRIPE_SECRET_KEY }}
- name: Build Next.js for E2E
env:
DATABASE_URL: ${{ secrets.DATABASE_URL }}
AUTH_TOKEN: ${{ secrets.AUTH_TOKEN }}
SRIPE_WEBHOOK_SECRET: ${{ secrets.SRIPE_WEBHOOK_SECRET}}
STRIPE_SECRET_KEY: ${{ secrets.STRIPE_SECRET_KEY }}
run: npm run build
- name: Linter
run: npm run lint
# - name: Run unit tests
# run: npm run test