Add Tests #327
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: CI | |
on: | |
pull_request: | |
push: | |
branches: [main] | |
jobs: | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
env: | |
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} | |
TURBO_TEAM: ${{ secrets.TURBO_TEAM }} | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v2 | |
- name: Install pnpm | |
uses: pnpm/action-setup@v2.2.2 | |
with: | |
version: 8 | |
- name: Setup Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: 18 | |
cache: 'pnpm' | |
- name: Install dependencies | |
run: pnpm install | |
- name: Lint | |
run: pnpm lint | |
typecheck: | |
name: Type check | |
runs-on: ubuntu-latest | |
env: | |
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} | |
TURBO_TEAM: ${{ secrets.TURBO_TEAM }} | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v2 | |
- name: Install pnpm | |
uses: pnpm/action-setup@v2.2.2 | |
with: | |
version: 8 | |
- name: Setup Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: 18 | |
cache: 'pnpm' | |
- name: Install dependencies | |
run: pnpm install | |
- name: Generate prisma type | |
working-directory: ./packages/database | |
run: pnpm db:generate | |
- name: Generate content types | |
working-directory: ./apps/resources | |
run: pnpm content | |
- name: Type check | |
run: pnpm typecheck | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
env: | |
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} | |
TURBO_TEAM: ${{ secrets.TURBO_TEAM }} | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v2 | |
- name: Install pnpm | |
uses: pnpm/action-setup@v2.2.2 | |
with: | |
version: 8 | |
- name: Setup Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: 18 | |
cache: 'pnpm' | |
- name: Install dependencies | |
run: pnpm install | |
- name: Generate prisma type | |
working-directory: ./packages/database | |
run: pnpm db:generate | |
- name: Generate content types | |
working-directory: ./apps/resources | |
run: pnpm content | |
- name: Test | |
run: pnpm test |