Skip to content

Commit

Permalink
Add node.js v19 to CI
Browse files Browse the repository at this point in the history
PR-URL: #253
  • Loading branch information
tshemsedinov committed Dec 14, 2022
1 parent 5d4065a commit c69893c
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 12 deletions.
14 changes: 10 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,16 @@ on: pull_request
jobs:
build:
runs-on: ubuntu-latest
container: node:14-alpine
container: node:${{ matrix.node }}-alpine

strategy:
matrix:
node:
- 14
- 16
- 18
- 19

services:
postgres:
image: postgres
Expand All @@ -15,9 +24,6 @@ jobs:

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
- uses: actions/cache@v2
with:
path: ~/.npm
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## [Unreleased][unreleased]

- Add empty line separator in SQL create script
- Run CI for node.js 14, 16, 18, 19 with postgres

## [2.1.0][] - 2022-08-18

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
},
"homepage": "https://github.com/metarhia/metasql#readme",
"engines": {
"node": "14 || 16 || 18"
"node": "14 || 16 || 18 || 19"
},
"dependencies": {
"metadomain": "^1.0.9",
Expand Down
12 changes: 5 additions & 7 deletions test/create.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,12 @@ metatests.test('Create structure', async (test) => {
const dir = process.cwd();
const schemaPath = path.join(dir, 'node_modules/metadomain/schemas');
try {
await metasql.create(schemaPath, 'test/sql');
const expect = await fsp.readFile('test/sql/expect.sql', {
encoding: 'utf8',
});
const database = await fsp.readFile('test/sql/database.sql', {
encoding: 'utf8',
});
await metasql.create(schemaPath, './');
await fsp.unlink('./database.d.ts');
const expect = await fsp.readFile('test/sql/expect.sql', 'utf8');
const database = await fsp.readFile('./database.sql', 'utf8');
test.strictEqual(database, expect);
await fsp.unlink('./database.sql');
} catch (err) {
test.error(err);
}
Expand Down

0 comments on commit c69893c

Please sign in to comment.