Skip to content

Commit

Permalink
Merge pull request #3 from j-mahapatra/feat/github-action-for-type-li…
Browse files Browse the repository at this point in the history
…nt-build-checks

feat: Add github action for type, lint and build checks
  • Loading branch information
akadeepesh authored Oct 20, 2024
2 parents 8ec5f47 + 01c81b6 commit 3e08f4a
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 3e08f4a

Please sign in to comment.