Skip to content

Commit 8e2aca8

Browse files
committed
test: add coverage reporting and update dependencies in configuration files
1 parent 439c9e3 commit 8e2aca8

File tree

8 files changed

+387
-27
lines changed

8 files changed

+387
-27
lines changed

.codacy.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
engines:
2+
duplication:
3+
enabled: true
4+
exclude_paths:
5+
- 'test/**'
6+
metric:
7+
enabled: true
8+
exclude_paths:
9+
- 'test/**'

.github/workflows/release.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,9 @@ jobs:
3737
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3838
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
3939
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
40+
41+
- name: Codacy Coverage Reporter
42+
uses: codacy/codacy-coverage-reporter-action@v1.3.0
43+
with:
44+
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
45+
coverage-reports: coverage/lcov.info

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
node_modules
2+
coverage
23
.DS_Store

Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
@PHONY: lint install test update drawio
1+
.PHONY: install lint test update drawio
22

33
install:
4-
npm install --no-audit --no-fund --prefer-offline
4+
npm install --no-audit --no-fund
55

66
lint:
77
npx eslint . --ext .ts,.js,.vue --fix
88
npx markdownlint --fix "**/*.md" -i node_modules
99
npx prettier --write "**/*.md" "**/*.json" "**/*.js" "**/*.ts" --log-level warn
1010

1111
test: lint
12-
CI=CI npx vitest
12+
CI=CI npx vitest --coverage
1313

1414
update:
1515
npx npm-check-updates -u
16-
npm install --no-audit --no-fund --prefer-offline
16+
npm install --no-audit --no-fund
1717

1818
drawio:
1919
@if [ -z "$(DRAWIO_CMD)" ]; then \

eslint.config.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
import js from '@eslint/js'
2-
import eslintPlugin from 'eslint-plugin-eslint-plugin'
32
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended'
43

54
export default [
65
// ignore common build and dependency folders
76
{ ignores: ['node_modules/**', 'dist/**', '.git/**', 'examples/**', '**/*.d.ts'] },
87
js.configs.recommended,
9-
eslintPlugin.configs.recommended,
108
eslintPluginPrettierRecommended,
119
{
10+
files: ['**/*.js'],
1211
// default language options and globals for plugin source files (Node environment)
1312
languageOptions: {
1413
ecmaVersion: 2022,
@@ -25,8 +24,7 @@ export default [
2524
},
2625
},
2726
{
28-
files: ['tests/**/*.js'],
29-
plugins: {},
27+
files: ['test/**/*.js'],
3028
// tests run under vitest/jest-like globals
3129
languageOptions: {
3230
globals: {

0 commit comments

Comments
 (0)