Skip to content

Merge pull request #1 from prazgaitis/fixes #11

Merge pull request #1 from prazgaitis/fixes

Merge pull request #1 from prazgaitis/fixes #11

Workflow file for this run

name: CI
on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
env:
PNPM_VERSION: 10.14.0
jobs:
checks:
name: Lint, Typecheck, and Build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Fetch base branch for turbo --affected
if: github.event_name == 'pull_request'
run: git fetch origin ${{ github.event.pull_request.base.ref }}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: ${{ env.PNPM_VERSION }}
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Lint
run: pnpm lint
- name: Typecheck
run: pnpm typecheck
- name: Build
env:
NEXT_PUBLIC_CONVEX_URL: "https://example.convex.cloud"
NEXT_PUBLIC_CONVEX_SITE_URL: "https://example.convex.site"
NEXT_PUBLIC_BETTER_AUTH_URL: "http://localhost:3000/api/auth"
NEXT_PUBLIC_APP_URL: "http://localhost:3000"
NEXT_PUBLIC_STRAVA_CLIENT_ID: "12345"
run: pnpm build
tests:
name: Tests
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: ${{ env.PNPM_VERSION }}
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Run tests
run: pnpm test