Connector - Keep table ordinal position #1048
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: Run unit test | |
on: | |
push: | |
branches: [ master] | |
paths-ignore: | |
- 'dbml-homepage/**' | |
pull_request: | |
branches: [ master ] | |
types: [opened, synchronize] | |
paths-ignore: | |
- 'dbml-homepage/**' | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
node-version: [18.x] | |
services: | |
postgres: | |
image: postgres:15-bullseye | |
env: | |
POSTGRES_USER: dbml | |
POSTGRES_PASSWORD: testtest | |
POSTGRES_DB: dbml_test | |
ports: | |
- 5432:5432 | |
# Set health checks to wait until postgres has started | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
mssql: | |
image: mcr.microsoft.com/mssql/server:2019-latest | |
env: | |
ACCEPT_EULA: Y | |
SA_PASSWORD: dbml.123.123 | |
ports: | |
- 1433:1433 | |
options: >- | |
--health-cmd "exit 0" | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
mysql-8.0: | |
image: mysql:8.0 | |
env: | |
MYSQL_DATABASE: dbml_test | |
MYSQL_ROOT_PASSWORD: root | |
ports: | |
- 3306:3306 | |
options: >- | |
--health-cmd "mysqladmin ping" | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 10 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Import DDL to Postgres | |
run: | | |
psql -h localhost -U dbml -d dbml_test -f packages/dbml-cli/__test__/db2dbml/postgres/schema.sql | |
env: | |
PGPASSWORD: testtest | |
- name: Import DDL to MySQL | |
run: | | |
mysql -h 127.0.0.1 -u root -proot dbml_test < packages/dbml-cli/__test__/db2dbml/mysql/schema.sql | |
- name: Import DDL to MSSQL | |
run: | | |
sqlcmd -S localhost -U sa -P dbml.123.123 -d master -i packages/dbml-cli/__test__/db2dbml/mssql/schema.sql | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'yarn' | |
- name: Install dependencies | |
run: yarn install --frozen-lockfile | |
- name: Build packages | |
run: yarn build | |
- name: Run unit tests | |
run: yarn test |