Skip to content

feat(ci): GitHub action for pull requests #24

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: 'Pull Request'
on:
pull_request:
branches:
- dev
paths-ignore:
- .gitignore
- README.md
- LICENSE

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: v21.1.0
cache: 'npm'
cache-dependency-path: '**/package-lock.json'

- name: Cache NPM dependencies
uses: actions/cache@v4
with:
path: ~/.npm
key: npm-cache-${{ runner.os }}-${{ hashFiles('package-lock.json') }}
restore-keys: |
npm-cache-${{ runner.os }}-

- name: Install Dependencies and Build
run: |
npm ci
npx prisma generate
npm run build:prod
env:
CI: true

- name: Cache Prisma Binary
uses: actions/cache@v4
with:
path: ~/.npm/_npx
key: prisma-binary-${{ runner.os }}-${{ hashFiles('package-lock.json') }}
restore-keys: prisma-binary-${{ runner.os }}-