Skip to content

copy triggers in sqlite table recreation #48

copy triggers in sqlite table recreation

copy triggers in sqlite table recreation #48

Workflow file for this run

name: Tests
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
build:
name: Build
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4
- name: Setup pnpm
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4
with:
version: 9.6.0
- name: Setup Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: '18'
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Compile TypeScript
run: pnpm compile
- name: Upload build artifacts
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: build
path: build/
test-mysql:
name: Test (MySQL)
runs-on: ubuntu-24.04
needs: build
services:
mysql:
image: mysql@sha256:1520c2db1591b37fc7f2c0bc72b4e0a002afed6fcc2397f7bcd2bbdff490c930 # 5.7.37
env:
MYSQL_ROOT_PASSWORD: admin
MYSQL_USER: test
MYSQL_PASSWORD: test
MYSQL_DATABASE: test
ports:
- 3306:3306
options: >-
--health-cmd="mysqladmin ping"
--health-interval=10s
--health-timeout=5s
--health-retries=3
steps:
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4
- name: Setup pnpm
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4
with:
version: 9.6.0
- name: Setup Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: '18'
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Download build artifacts
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
with:
name: build
path: build/
- name: Configure ormconfig for MySQL
run: |
jq 'map(.skip = if .name == "mysql" then false else true end)' ormconfig.json.dist > ormconfig.json
cat ormconfig.json
- name: Run tests
run: pnpm test-fast
test-mariadb:
name: Test (MariaDB)
runs-on: ubuntu-24.04
needs: build
services:
mariadb:
image: mariadb@sha256:9a77e977742823fac7eddddefee837aa0466ed2821cfe23b258002bc118be3d8 # 10.10.3
env:
MYSQL_ROOT_PASSWORD: admin
MYSQL_USER: test
MYSQL_PASSWORD: test
MYSQL_DATABASE: test
ports:
- 3307:3306
options: >-
--health-cmd="mysqladmin ping"
--health-interval=10s
--health-timeout=5s
--health-retries=3
steps:
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4
- name: Setup pnpm
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4
with:
version: 9.6.0
- name: Setup Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: '18'
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Download build artifacts
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
with:
name: build
path: build/
- name: Configure ormconfig for MariaDB
run: |
jq 'map(.skip = if .name == "mariadb" then false else true end)' ormconfig.json.dist > ormconfig.json
cat ormconfig.json
- name: Run tests
run: pnpm test-fast
test-postgres:
name: Test (PostgreSQL)
runs-on: ubuntu-24.04
needs: build
services:
postgres:
image: postgis/postgis@sha256:b2ea11c9767c1b327f4c02252d9077fbbcea684d4d5b1369dc05f0eeebc82ff5 # 14-3.3
env:
POSTGRES_USER: test
POSTGRES_PASSWORD: test
POSTGRES_DB: test
ports:
- 5432:5432
options: >-
--health-cmd="pg_isready -U test"
--health-interval=10s
--health-timeout=5s
--health-retries=3
steps:
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4
- name: Setup pnpm
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4
with:
version: 9.6.0
- name: Setup Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: '18'
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Download build artifacts
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
with:
name: build
path: build/
- name: Configure ormconfig for PostgreSQL
run: |
jq 'map(.skip = if .name == "postgres" then false else true end)' ormconfig.json.dist > ormconfig.json
cat ormconfig.json
- name: Run tests
run: pnpm test-fast
test-sqlite:
name: Test (SQLite)
runs-on: ubuntu-24.04
needs: build
steps:
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4
- name: Setup pnpm
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4
with:
version: 9.6.0
- name: Setup Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: '18'
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Download build artifacts
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
with:
name: build
path: build/
- name: Configure ormconfig for SQLite
run: |
jq 'map(.skip = if .name == "sqlite" then false else true end)' ormconfig.json.dist > ormconfig.json
cat ormconfig.json
- name: Run tests
run: pnpm test-fast
test-sqlite-pooled:
name: Test (SQLite Pooled)
runs-on: ubuntu-24.04
needs: build
steps:
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4
- name: Setup pnpm
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4
with:
version: 9.6.0
- name: Setup Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: '18'
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Download build artifacts
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
with:
name: build
path: build/
- name: Configure ormconfig for SQLite Pooled
run: |
jq 'map(.skip = if .name == "sqlite-pooled" then false else true end)' ormconfig.json.dist > ormconfig.json
cat ormconfig.json
- name: Run tests
run: pnpm test-fast