feat: expand redis parameters and add Prisma_Push env #14
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
pull_request: | |
branches: | |
- main | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '18' | |
- name: Install pnpm | |
run: npm install -g pnpm | |
- name: Install dependencies | |
run: pnpm install | |
- name: Lint | |
run: pnpm lint | |
- name: Check code formatting | |
run: pnpm format --check | |
- name: Build | |
run: pnpm build | |
tests: | |
needs: [lint] | |
runs-on: ubuntu-latest | |
env: | |
MAIN_DATABASE_URI: ${{ secrets.MAIN_DATABASE_URI }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '18' | |
- name: Install pnpm | |
run: npm install -g pnpm | |
- name: Install dependencies | |
run: pnpm install | |
- name: Start Redis | |
run: docker-compose --file docker/redis/docker-compose.yaml up -d | |
- name: Start MongoDB | |
uses: supercharge/[email protected] | |
with: | |
mongodb-version: '6.0' | |
mongodb-replica-set: testdb | |
mongodb-port: 27018 | |
- name: Run Prisma migrations | |
run: | | |
pnpm prisma:generate:test | |
pnpm prisma:push:test | |
- name: Run tests | |
run: pnpm test | |
- name: Stop Docker containers | |
run: | | |
docker-compose --file docker/redis/docker-compose.yaml down | |
docker-compose --file docker/mongodb/docker-compose.yaml down |