Skip to content

fix(seed): refuse to run against a prod / preprod database #1619

fix(seed): refuse to run against a prod / preprod database

fix(seed): refuse to run against a prod / preprod database #1619

Workflow file for this run

name: CI
on:
push:
concurrency:
cancel-in-progress: true
group: "${{ github.workflow }}-${{ github.event_name }}-${{ github.event.ref }}"
env:
NODE_ENV: test
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0 # Shallow clones should be disabled for better SonarCloud analysis
- uses: pnpm/action-setup@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Typecheck
run: pnpm typecheck
- name: Build
run: pnpm build
env:
SKIP_ENV_VALIDATION: "1"
- name: Cache build
uses: actions/cache@v4
with:
path: ./*
key: "${{ github.sha }}"
lint:
name: Lint & Format
runs-on: ubuntu-latest
needs:
- build
steps:
- name: Restore build
uses: actions/cache@v4
with:
path: ./*
key: "${{ github.sha }}"
- uses: pnpm/action-setup@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
cache: pnpm
- name: Lint
run: pnpm lint:check
- name: Format check
run: pnpm format:check
unit-tests:
name: Unit Tests
runs-on: ubuntu-latest
needs:
- build
steps:
- name: Restore build
uses: actions/cache@v4
with:
path: ./*
key: "${{ github.sha }}"
- uses: pnpm/action-setup@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
cache: pnpm
- name: Run unit tests with coverage
run: pnpm test:app:coverage
- name: SonarCloud Scan
uses: SonarSource/sonarqube-scan-action@v4
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}