diff --git a/.c8rc.json b/.c8rc.json new file mode 100644 index 00000000..fd727929 --- /dev/null +++ b/.c8rc.json @@ -0,0 +1,6 @@ +{ + "include": ["src/**/*.ts", "src/**/*.tsx"], + "exclude": ["**/__tests__/**", "src/lib/server/routes.ts"], + "reporter": ["text", "html"], + "lines": 50 +} diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 43144c3d..76146f36 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -1,8 +1,8 @@ name: Lint and Test on: - push: - branches-ignore: ['main'] + pull_request: + types: [opened, reopened, synchronize] concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -21,6 +21,7 @@ jobs: docker_compose_file: '' npm_build_command: 'npm run build' tests: '["test:unit", "test:integration", "test:ratelimit"]' + coverage_config_json: '.c8rc.json' node_version: '24' env_vars: | { @@ -50,4 +51,3 @@ jobs: permissions: packages: write contents: write - diff --git a/.gitignore b/.gitignore index 0b52e7cc..120a83a0 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,5 @@ obj /playwright/.cache/ .env playwright/.auth + +coverage/ diff --git a/package-lock.json b/package-lock.json index 4c77a3b5..30d061c5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "dtdl-visualisation-tool", - "version": "0.7.2", + "version": "0.7.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "dtdl-visualisation-tool", - "version": "0.7.2", + "version": "0.7.3", "license": "Apache-2.0", "dependencies": { "@digicatapult/dtdl-parser": "^1.0.61", diff --git a/package.json b/package.json index b1b3f385..66a303f3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "dtdl-visualisation-tool", - "version": "0.7.2", + "version": "0.7.3", "description": "CLI tool for dtdl visualisation", "main": "build/index.js", "bin": {