Skip to content

Review Header

Review Header #62

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
env:
NODE_VERSION: 20
PNPM_VERSION: 8
# Find a workaround for this.
DATABASE_URL: "postgresql://admin:admin@localhost:5432/cooper?schema=public"
NEXTAUTH_URL: "localhost:3000"
NEXTAUTH_SECRET: "sec"
GOOGLE_CLIENT_ID: "cooper"
GOOGLE_CLIENT_SECRET: "cooper"
jobs:
lint:
name: Run Eslint And Prettier
runs-on: ubuntu-latest
steps:
- name: Code Checkout
uses: actions/checkout@v4
- name: Install NodeJS
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: ${{ env.PNPM_VERSION }}
run_install: false
- name: Get pnpm Store Directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- name: Setup pnpm Cache
uses: actions/cache@v3
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install Dependencies
run: pnpm install
- name: Code Linting
run: pnpm run lint
- name: Code Formatting
run: pnpm run format:check
tsc:
name: Run Typescript Compiler
runs-on: ubuntu-latest
steps:
- name: Code Checkout
uses: actions/checkout@v4
- name: Install NodeJS
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: ${{ env.PNPM_VERSION }}
run_install: false
- name: Get pnpm Store Directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- name: Setup pnpm Cache
uses: actions/cache@v3
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install Dependencies
run: pnpm install
- name: Code Typechecking
run: pnpm tsc