Skip to content

Merge pull request #17 from Alan-Kuan/dependabot/npm_and_yarn/mongoos… #57

Merge pull request #17 from Alan-Kuan/dependabot/npm_and_yarn/mongoos…

Merge pull request #17 from Alan-Kuan/dependabot/npm_and_yarn/mongoos… #57

Workflow file for this run

name: Test before Deployment
on:
workflow_dispatch:
pull_request:
push:
branches:
- master
paths:
- api/**
- lib/**
- test/**
- babel.config.json
- jest.config.json
- package.json
- pnpm-lock.yaml
- tsconfig.json
- vercel.json
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout current commit
uses: actions/checkout@v3
- name: Install pnpm
uses: pnpm/action-setup@v4
- name: Setup Node.js v18 environment
uses: actions/setup-node@v4
with:
node-version: 18
cache: pnpm
- name: Install Node dependencies
run: pnpm install
- name: Run type checks
run: pnpm type-check
- name: Run unit tests
run: pnpm test
- name: Deploy to Vercel
uses: amondnet/vercel-action@v25
with:
vercel-token: ${{ secrets.VERCEL_TOKEN }}
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }}
vercel-args: --prod