Skip to content

Commit

Permalink
feat: Add github action for type, lint and build checks
Browse files Browse the repository at this point in the history
  • Loading branch information
j-mahapatra committed Oct 20, 2024
1 parent 8ec5f47 commit 01c81b6
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 1 deletion.
67 changes: 67 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: CI

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
typescript:
name: TypeScript Check
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '18'

- name: Install dependencies
run: npm install

- name: TypeScript check
run: npm run type-check

linting:
name: Lint Check
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '18'

- name: Install dependencies
run: npm install

- name: Lint check
run: npm run lint

build:
name: Build Check
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '18'

- name: Install dependencies
run: npm install

- name: Build project
run: npm run build
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint"
"lint": "next lint",
"type-check": "tsc --noEmit"
},
"dependencies": {
"@auth/prisma-adapter": "^2.5.0",
Expand Down

0 comments on commit 01c81b6

Please sign in to comment.