Skip to content

merge dev to main

merge dev to main #875

Workflow file for this run

# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
name: CI
env:
TELEMETRY_TRACKING_TOKEN: ${{ secrets.TELEMETRY_TRACKING_TOKEN }}
DO_NOT_TRACK: '1'
on:
pull_request:
branches: ['dev', 'main']
jobs:
build-test:
runs-on: buildjet-8vcpu-ubuntu-2204
services:
postgres:
image: postgres
env:
POSTGRES_PASSWORD: abc123
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
strategy:
matrix:
node-version: [18.x]
prisma-version: [v4, v5]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set Prisma Version
if: ${{ matrix.prisma-version == 'v5' }}
shell: bash
run: |
bash ./script/test-prisma-v5.sh
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: ^7.15.0
- name: Use Node.js ${{ matrix.node-version }}
uses: buildjet/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- name: Setup pnpm cache
uses: buildjet/cache@v3
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build
run: DEFAULT_NPM_TAG=latest pnpm run build
- name: Lint
run: pnpm lint
# install again for internal dependencies
- name: Install internal dependencies
run: pnpm install --frozen-lockfile
- name: Test
run: pnpm run test-ci