-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (32 loc) · 925 Bytes
/
pr-main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
name: Run CI checks before PR to main branch
on:
pull_request:
branches: ["main"]
jobs:
ci-main:
environment: test
runs-on: ubuntu-latest
steps:
- name: Git checkout
uses: actions/checkout@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
- name: Install dependencies with pnpm
run: |
corepack enable
pnpm i
- name: Check types with TypeScript
run: pnpm check-types
- name: Lint with ESLint
run: pnpm lint
- name: Check format with Prettier
run: pnpm check-format
- name: Run unit tests with Vitest
run: pnpm test:unit
env:
PROJECT_URL: ${{vars.PROJECT_URL}}
MONGODB_URL: ${{secrets.MONGODB_URL}}
PASSWORD_PEPPER: ${{secrets.PASSWORD_PEPPER}}
SEND_EMAIL: ${{vars.SEND_EMAIL}}