ci: upload test coverage results (#298)

Also rename the artifact storing all examples for clarity.
development
Thomas Bouffard 2023-12-29 07:24:34 +01:00 committed by GitHub
parent 7544da2da3
commit 728776b3e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 16 additions and 14 deletions

View File

@ -45,7 +45,12 @@ jobs:
- name: Build @maxgraph/core - esm
run: npm run build -w packages/core
- name: Test @maxgraph/core
run: npm test -w packages/core
run: npm test -w packages/core -- --coverage
- name: Upload test results as artifact
uses: actions/upload-artifact@v4
with:
name: test-coverage-${{runner.os}}-${{github.sha}}
path: packages/core/coverage/lcov-report
- name: Test TypeScript support
run: npm test -w packages/ts-support
- name: Build ts-example
@ -55,7 +60,7 @@ jobs:
- name: Upload all examples as artifact
uses: actions/upload-artifact@v4
with:
name: bundles-test-results-${{runner.os}}-${{github.sha}}
name: examples-${{runner.os}}-${{github.sha}}
path: |
packages/html/dist/
packages/ts-example/dist/

19
.gitignore vendored
View File

@ -1,24 +1,17 @@
node_modules
javascript/dist
.jshintrc
javascript/examples/**/dist
.idea/
.vscode/
*.iml
.vscode/
dist
*.tgz
# dependencies
/node_modules
node_modules/
/.pnp
.pnp.js
# testing
/coverage
# next.js
/.next/
/out/
coverage/
# production
build/
@ -38,6 +31,8 @@ yarn-error.log*
.env.test.local
.env.production.local
# vercel
# vercel/next.js
.next/
.vercel
/src/.next/
src/.next/
out/

View File

@ -1,5 +1,7 @@
/** @type {import('ts-jest').JestConfigWithTsJest} */
module.exports = {
collectCoverageFrom: ['src/**/*.{ts,js}'],
coverageReporters: ['lcov', 'text-summary'],
// preset: 'ts-jest',
preset: 'ts-jest/presets/default-esm',
testEnvironment: 'jsdom', // need to access to the browser objects