Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
3ebcc99
Add baseline-schema-file param and configure workflow to use example …
gfx Sep 24, 2025
c3836c0
Use local action instead of main branch
gfx Sep 24, 2025
c555909
Fix SQLDef version from 'latest' to 'v3.0.0'
gfx Sep 24, 2025
0312cbb
Add baseline-schema-file support to main.ts and rebuild
gfx Sep 24, 2025
ae63b1f
Fix ncc build to use correct source file
gfx Sep 24, 2025
6f34cb2
Add permissions for PR comments in example workflow
gfx Sep 24, 2025
43f0366
Make MSSQL job optional and fix sqlcmd paths
gfx Sep 24, 2025
7391844
Add support for 'latest' version with proper URL pattern
gfx Sep 24, 2025
6aa6d09
Fix CI failures and update MSSQL to stable 2019 version
gfx Sep 24, 2025
d662638
Fix CI tests for missing baseline schemas
gfx Sep 24, 2025
b6b081e
Remove schema.sql from example branch to fix CI tests
gfx Sep 24, 2025
93724ba
Fix exec.exec return value handling for git show command
gfx Sep 24, 2025
309db9f
Trigger CI after removing schema.sql from main
gfx Sep 24, 2025
21af80d
Fix CI test workflows to work properly
gfx Sep 24, 2025
d55f980
Fix SQLite test schema - remove DEFAULT CURRENT_TIMESTAMP
gfx Sep 24, 2025
cb4aa29
Create empty SQLite database file before running test
gfx Sep 24, 2025
0848c16
Add version check and update MSSQL to 2022-latest
gfx Sep 24, 2025
2c4b30d
Remove test database jobs from ci.yaml
gfx Sep 24, 2025
91177c1
tweaks
gfx Sep 24, 2025
fdf8280
Improve error handling to show stderr output for debugging mssqldef f…
gfx Sep 24, 2025
6c806d7
Update dist files with improved error handling
gfx Sep 24, 2025
3a3a7f0
Fix mssqldef parameter flags: swap -p (port) and -P (password)
gfx Sep 24, 2025
9fabe14
Add better error logging for debugging mssqldef failures
gfx Sep 24, 2025
513232c
Enable verbose output to debug mssqldef connection errors
gfx Sep 24, 2025
a65317b
docker compose for DB
gfx Sep 24, 2025
9b84405
use docker compose in CI (as sqldef does)
gfx Sep 24, 2025
bd6be7c
update
gfx Sep 24, 2025
c01f5e6
gitattributes
gfx Sep 24, 2025
e8289e0
Fix password handling for mysqldef and mssqldef
gfx Sep 24, 2025
5bf3141
Fix mysqldef connection for empty password
gfx Sep 24, 2025
95e16ac
Fix CI issues for MySQL and MSSQL
gfx Sep 24, 2025
a5b066e
Fix password handling for mysqldef and mssqldef
gfx Sep 24, 2025
76c6303
Add debugging for MySQL connection issue
gfx Sep 24, 2025
038f23e
Fix MySQL connection by using 127.0.0.1 instead of localhost
gfx Sep 24, 2025
343f7a3
Use password for MySQL in CI to avoid connection issues
gfx Sep 24, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
dist/* binary

155 changes: 3 additions & 152 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ on:
pull_request:
branches: [main]

permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -15,7 +17,7 @@ jobs:
uses: actions/checkout@v5

- name: Setup Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v5
with:
node-version: '24'
cache: 'npm'
Expand All @@ -34,154 +36,3 @@ jobs:

- name: Package action
run: npm run package

test-action:
runs-on: ubuntu-latest

services:
postgres:
image: postgres:17
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: testdb
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432

steps:
- name: Checkout code
uses: actions/checkout@v5

- name: Create test schema file
run: |
cat > schema.sql <<EOF
CREATE TABLE IF NOT EXISTS users (
id SERIAL PRIMARY KEY,
username VARCHAR(50) UNIQUE NOT NULL,
email VARCHAR(100) UNIQUE NOT NULL,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);

CREATE TABLE IF NOT EXISTS posts (
id SERIAL PRIMARY KEY,
user_id INTEGER REFERENCES users(id),
title VARCHAR(200) NOT NULL,
content TEXT,
published_at TIMESTAMP,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);

CREATE INDEX IF NOT EXISTS idx_posts_user_id ON posts(user_id);
CREATE INDEX IF NOT EXISTS idx_posts_published_at ON posts(published_at);
EOF

- name: Test PostgreSQL action (dry-run)
uses: ./
with:
command: psqldef
version: latest
schema-file: schema.sql
pg-user: postgres
pg-password: postgres
pg-host: localhost
pg-port: 5432
pg-database: testdb

test-mysql:
runs-on: ubuntu-latest

services:
mysql:
image: mysql:8.0
env:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: testdb
options: >-
--health-cmd="mysqladmin ping"
--health-interval=10s
--health-timeout=5s
--health-retries=5
ports:
- 3306:3306

steps:
- name: Checkout code
uses: actions/checkout@v5

- name: Create MySQL test schema file
run: |
cat > schema.sql <<EOF
CREATE TABLE IF NOT EXISTS users (
id INT AUTO_INCREMENT PRIMARY KEY,
username VARCHAR(50) UNIQUE NOT NULL,
email VARCHAR(100) UNIQUE NOT NULL,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);

CREATE TABLE IF NOT EXISTS posts (
id INT AUTO_INCREMENT PRIMARY KEY,
user_id INT,
title VARCHAR(200) NOT NULL,
content TEXT,
published_at TIMESTAMP NULL,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY (user_id) REFERENCES users(id),
INDEX idx_posts_user_id (user_id),
INDEX idx_posts_published_at (published_at)
);
EOF

- name: Test MySQL action
uses: ./
with:
command: mysqldef
version: latest
schema-file: schema.sql
mysql-user: root
mysql-password: root
mysql-host: 127.0.0.1
mysql-port: 3306
mysql-database: testdb

test-sqlite:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v5

- name: Create SQLite test schema file
run: |
cat > schema.sql <<EOF
CREATE TABLE IF NOT EXISTS users (
id INTEGER PRIMARY KEY AUTOINCREMENT,
username TEXT UNIQUE NOT NULL,
email TEXT UNIQUE NOT NULL,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);

CREATE TABLE IF NOT EXISTS posts (
id INTEGER PRIMARY KEY AUTOINCREMENT,
user_id INTEGER REFERENCES users(id),
title TEXT NOT NULL,
content TEXT,
published_at TIMESTAMP,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);

CREATE INDEX IF NOT EXISTS idx_posts_user_id ON posts(user_id);
CREATE INDEX IF NOT EXISTS idx_posts_published_at ON posts(published_at);
EOF

- name: Test SQLite action
uses: ./
with:
command: sqlite3def
version: latest
schema-file: schema.sql
sqlite-database: test.db
Loading