Skip to content

Commit

Permalink
test: Expand node version matrix to node16, node18, and node20 (typeo…
Browse files Browse the repository at this point in the history
  • Loading branch information
OSA413 authored Dec 14, 2024
1 parent 40204e6 commit af603ae
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 16 deletions.
27 changes: 18 additions & 9 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
strategy:
fail-fast: false
matrix:
node-version: [18.x] #["node:16", "node:18", "node:20", "node:22"]
node-version: [16.x, 18.x, 20.x] #, 22.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
Expand All @@ -35,7 +35,7 @@ jobs:
strategy:
fail-fast: false
matrix:
node-container: ["node:18"] #["node:16", "node:18", "node:20", "node:22"]
node-container: ["node:16", "node:18", "node:20"] #, "node:22"]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

container: ${{ matrix.node-container }}
Expand All @@ -46,6 +46,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- run: npm i
- run: chown -R 1001:127 /github/home/.npm #This fix is needed for running CLI tests
- run: cp .github/workflows/test/mongodb.ormconfig.json ormconfig.json
- run: npm test

Expand All @@ -55,7 +56,7 @@ jobs:
strategy:
fail-fast: false
matrix:
node-container: ["node:18"] #["node:16", "node:18", "node:20", "node:22"]
node-container: ["node:16", "node:18", "node:20"] #, "node:22"]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

container: ${{ matrix.node-container }}
Expand All @@ -69,6 +70,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- run: npm i
- run: chown -R 1001:127 /github/home/.npm #This fix is needed for running CLI tests
- run: cp .github/workflows/test/mssql.ormconfig.json ormconfig.json
- run: npm test

Expand All @@ -78,7 +80,7 @@ jobs:
strategy:
fail-fast: false
matrix:
node-container: ["node:18"] #["node:16", "node:18", "node:20", "node:22"]
node-container: ["node:16", "node:18", "node:20"] #, "node:22"]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

container: ${{ matrix.node-container }}
Expand All @@ -101,6 +103,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- run: npm i
- run: chown -R 1001:127 /github/home/.npm #This fix is needed for running CLI tests
- run: cp .github/workflows/test/mysql-mariadb.ormconfig.json ormconfig.json
- run: npm test

Expand All @@ -110,7 +113,7 @@ jobs:
strategy:
fail-fast: false
matrix:
node-version: [18.x] #["node:16", "node:18", "node:20", "node:22"]
node-version: [16.x, 18.x, 20.x] #, 22.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
Expand All @@ -129,14 +132,16 @@ jobs:
strategy:
fail-fast: false
matrix:
node-container: ["node:18"] #["node:16", "node:18", "node:20", "node:22"]
node-container: ["node:16", "node:18", "node:20"] #, "node:22"]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

container: ${{ matrix.node-container }}

steps:
- uses: actions/checkout@v4
- run: npm i
- run: chown -R 1001:127 /github/home/.npm #This fix is needed for running CLI tests
- run: chown -R 1001:127 ./temp #This fix is needed for fixing permission error on Node 16
- run: cp .github/workflows/test/better-sqlite3.ormconfig.json ormconfig.json
- run: npm test

Expand All @@ -146,14 +151,16 @@ jobs:
strategy:
fail-fast: false
matrix:
node-container: ["node:18"] #["node:16", "node:18", "node:20", "node:22"]
node-container: ["node:16", "node:18", "node:20"] #, "node:22"]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

container: ${{ matrix.node-container }}

steps:
- uses: actions/checkout@v4
- run: npm i
- run: chown -R 1001:127 /github/home/.npm #This fix is needed for running CLI tests
- run: chown -R 1001:127 ./temp #This fix is needed for fixing permission error on Node 16
- run: cp .github/workflows/test/sqlite.ormconfig.json ormconfig.json
- run: npm test

Expand All @@ -163,14 +170,15 @@ jobs:
strategy:
fail-fast: false
matrix:
node-container: ["node:18"] #["node:16", "node:18", "node:20", "node:22"]
node-container: ["node:16", "node:18", "node:20"] #, "node:22"]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

container: ${{ matrix.node-container }}

steps:
- uses: actions/checkout@v4
- run: npm i
- run: chown -R 1001:127 /github/home/.npm #This fix is needed for running CLI tests
- run: cp .github/workflows/test/sqljs.ormconfig.json ormconfig.json
- run: npm test

Expand All @@ -180,7 +188,7 @@ jobs:
strategy:
fail-fast: false
matrix:
node-container: ["node:18"] #["node:16", "node:18", "node:20", "node:22"]
node-container: ["node:16", "node:18", "node:20"] #, "node:22"]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

container: ${{ matrix.node-container }}
Expand All @@ -200,5 +208,6 @@ jobs:
steps:
- uses: actions/checkout@v4
- run: npm i
- run: chown -R 1001:127 /github/home/.npm #This fix is needed for running CLI tests
- run: cp .github/workflows/test/postgres.ormconfig.json ormconfig.json
- run: npm test
2 changes: 1 addition & 1 deletion .github/workflows/test/better-sqlite3.ormconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"skip": false,
"name": "better-sqlite3",
"type": "better-sqlite3",
"database": "temp/better-sqlite3db.db",
"database": "./temp/better-sqlite3db.db",
"logging": false
},

Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@
"peerDependencies": {
"@google-cloud/spanner": "^5.18.0",
"@sap/hana-client": "^2.12.25",
"better-sqlite3": "^7.1.2 || ^8.0.0 || ^9.0.0",
"better-sqlite3": "^8.0.0 || ^9.0.0",
"hdb-pool": "^0.1.6",
"ioredis": "^5.0.4",
"mongodb": "^5.8.0",
Expand Down
2 changes: 1 addition & 1 deletion src/commands/InitCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -717,7 +717,7 @@ Steps to run this project:
packageJson.dependencies["sqlite3"] = "^5.0.2"
break
case "better-sqlite3":
packageJson.dependencies["better-sqlite3"] = "^7.0.0"
packageJson.dependencies["better-sqlite3"] = "^8.0.0"
break
case "oracle":
packageJson.dependencies["oracledb"] = "^5.1.0"
Expand Down
8 changes: 5 additions & 3 deletions test/github-issues/10209/issue-10209.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@ describe("github issues > #10209", () => {
beforeEach(() => reloadTestingDatabases(dataSources))
after(() => closeTestingConnections(dataSources))

it("should not fail to run multiple nested transactions in parallel", () =>
Promise.all(
it("should not fail to run multiple nested transactions in parallel", function () {
this.retries(3) // Fix for SQLite
return Promise.all(
dataSources.map(async (dataSource) => {
const manager = dataSource.createEntityManager()

Expand Down Expand Up @@ -84,5 +85,6 @@ describe("github issues > #10209", () => {
// We only care that the transaction above didn't fail
expect(true).to.be.true
}),
))
)
})
})

0 comments on commit af603ae

Please sign in to comment.