Skip to content

Commit

Permalink
chore: change lint to pnpm
Browse files Browse the repository at this point in the history
  • Loading branch information
nexmoe committed Feb 25, 2024
1 parent 588fd50 commit 319ea31
Showing 1 changed file with 17 additions and 13 deletions.
30 changes: 17 additions & 13 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ on:
branches: [main]

jobs:
# This job will run linting, typechecking and tests on your codebase
testCodebase:
runs-on: ubuntu-latest
steps:
Expand All @@ -16,23 +15,25 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: 16.14.2
# Enable caching for pnpm
cache: 'pnpm'

# Install packages
- run: npm ci
# Install pnpm and packages
- run: npm install -g pnpm
- run: pnpm install

# Generate prisma client & push to db
- run: echo "DATABASE_URL=file:./db.sqlite" > .env
- run: npx prisma db push
- run: npx prisma generate

# Run linting and typechecking
- run: npm run lint
- run: npm run typecheck
- run: pnpm run lint
- run: pnpm run typecheck

# Run tests
- run: npm run test
- run: pnpm run test

# This job will run the app and then use `curl` to visit the index-page. This is a smoke detector check that ensures that your app still builds & runs correctly
testAppBuildsAndStarts:
runs-on: ubuntu-latest
steps:
Expand All @@ -41,17 +42,20 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: 16.14.2
# Enable caching for pnpm
cache: 'pnpm'

# Install packages
- run: npm ci
# Install pnpm and packages
- run: npm install -g pnpm
- run: pnpm install

# Generate prisma client & push to db
- run: echo "DATABASE_URL=file:./db.sqlite" > .env
- run: npx prisma db push
- run: npx prisma generate

# start app in dev mode and load `/`-index page
- run: '(timeout 60 npm run dev & (sleep 10 && curl --fail localhost:3000)) && echo Run development check successful'
# Start app in dev mode and load `/`-index page
- run: '(timeout 60 pnpm run dev & (sleep 10 && curl --fail localhost:3000)) && echo Run development check successful'

# build & start app in production mode and load `/`-index page
- run: 'npm run build && (timeout 60 npm run preview & (sleep 10 && curl --fail localhost:3000)) && echo Run production check successful'
# Build & start app in production mode and load `/`-index page
- run: 'pnpm run build && (timeout 60 pnpm run preview & (sleep 10 && curl --fail localhost:3000)) && echo Run production check successful'

0 comments on commit 319ea31

Please sign in to comment.