Skip to content

Commit

Permalink
111
Browse files Browse the repository at this point in the history
  • Loading branch information
dengfuping committed Dec 2, 2024
1 parent 2187649 commit 4330ad0
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 9 deletions.
14 changes: 13 additions & 1 deletion .github/workflows/javascript.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
- 'javascript/**'

jobs:
ci:
mysql2:
strategy:
matrix:
module:
Expand All @@ -22,3 +22,15 @@ jobs:
language: 'javascript'
module: ${{ matrix.module.name }}
with_oceanbase_container: ${{ matrix.module.with_oceanbase_container }}

sequelize:
strategy:
matrix:
module:
- name: 'sequelize'
with_oceanbase_container: true
uses: ./.github/workflows/basic-workflow.yml
with:
language: 'javascript'
module: ${{ matrix.module.name }}
with_oceanbase_container: ${{ matrix.module.with_oceanbase_container }}
11 changes: 4 additions & 7 deletions javascript/sequelize/index.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
const { Sequelize, DataTypes } = require("sequelize");

const sequelize = new Sequelize(
"mysql://username:password@localhost:3306/test",
{
dialect: "mysql",
logging: false,
}
);
const sequelize = new Sequelize("mysql://root:@localhost:2881/test", {
dialect: "mysql",
logging: false,
});

const UserModel = sequelize.define(
"users",
Expand Down
2 changes: 1 addition & 1 deletion javascript/sequelize/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "1.0.0",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"test": "node index.js"
},
"keywords": [],
"author": "",
Expand Down
2 changes: 2 additions & 0 deletions javascript/sequelize/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/usr/bin/env bash
npm run test

0 comments on commit 4330ad0

Please sign in to comment.