Skip to content

Commit

Permalink
ci: add check for node.js and test if ci fails with fix removed
Browse files Browse the repository at this point in the history
  • Loading branch information
jpedroschmitz committed Jan 30, 2024
1 parent f70cc87 commit 301012a
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,7 @@ jobs:

- name: Test
run: yarn test --ci --coverage --maxWorkers=2

- name: Run Node.js Environment Test for @graphcms/html-to-slate-ast
run: yarn test:node
working-directory: ./packages/html-to-slate-ast
5 changes: 4 additions & 1 deletion packages/html-to-slate-ast/examples/node-script.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,7 @@ async function main() {

main()
.then(() => process.exit(0))
.catch(e => console.error(e));
.catch(e => {
console.error(e);
process.exit(1);
});
3 changes: 2 additions & 1 deletion packages/html-to-slate-ast/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
"test": "tsdx test --passWithNoTests",
"test:watch": "tsdx test --watch --passWithNoTests",
"lint": "tsdx lint",
"prepublish": "npm run build"
"prepublish": "npm run build",
"test:node": "node examples/node-script.js"
},
"peerDependencies": {
"slate": "^0.66.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/html-to-slate-ast/tsup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ export default defineConfig(options => ({
treeshake: true,
clean: true,
format: ['esm', 'cjs'],
skipNodeModulesBundle: true,
// skipNodeModulesBundle: true,
}));

0 comments on commit 301012a

Please sign in to comment.