diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f359965..05a7c49 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -27,7 +27,7 @@ jobs: run: npm install - name: Run Tests - run: npm run test:unit + run: node --test --test-reporter=@reporters/github --test-reporter-destination=stdout --test-reporter=spec --test-reporter-destination=stdout --loader=tsx ./tests/e2e/index.test.ts e2e-test: name: E2E Tests runs-on: ubuntu-latest @@ -49,4 +49,4 @@ jobs: run: npm install - name: Run Tests - run: npm run test:e2e + run: node --test --test-reporter=@reporters/github --test-reporter-destination=stdout --test-reporter=spec --test-reporter-destination=stdout --loader=tsx ./tests/unit/index.test.ts diff --git a/package-lock.json b/package-lock.json index 7f1a66a..ff80260 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,6 +14,7 @@ "devDependencies": { "@aws-sdk/client-s3": "^3.421.0", "@cloudflare/workers-types": "^4.20230922.0", + "@reporters/github": "^1.5.3", "@types/node": "^20.7.0", "@typescript-eslint/eslint-plugin": "^6.7.3", "@typescript-eslint/parser": "^6.7.3", @@ -38,6 +39,25 @@ "node": ">=0.10.0" } }, + "node_modules/@actions/core": { + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.10.1.tgz", + "integrity": "sha512-3lBR9EDAY+iYIpTnTIXmWcNbX3T2kCkAEQGIQx4NVQ0575nk2k3GRZDTPQG+vVtS2izSLmINlxXf0uLtnrTP+g==", + "dev": true, + "dependencies": { + "@actions/http-client": "^2.0.1", + "uuid": "^8.3.2" + } + }, + "node_modules/@actions/http-client": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.1.1.tgz", + "integrity": "sha512-qhrkRMB40bbbLo7gF+0vu+X+UawOvQQqNAA/5Unx774RS8poaOhThDOG6BGmxvAnxhQnDp2BG/ZUm65xZILTpw==", + "dev": true, + "dependencies": { + "tunnel": "^0.0.6" + } + }, "node_modules/@aws-crypto/crc32": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/@aws-crypto/crc32/-/crc32-3.0.0.tgz", @@ -1545,6 +1565,16 @@ "url": "https://opencollective.com/unts" } }, + "node_modules/@reporters/github": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/@reporters/github/-/github-1.5.3.tgz", + "integrity": "sha512-PIoLFSs/yAkBnuNEwYyQE8FE8V9fVZXWla/7vapVv5YCkk85Ql5fw3ryJpB17diGU+Q2NwpeahLQ2KhJDbn4xQ==", + "dev": true, + "dependencies": { + "@actions/core": "^1.10.0", + "stack-utils": "^2.0.6" + } + }, "node_modules/@smithy/abort-controller": { "version": "2.0.10", "resolved": "https://registry.npmjs.org/@smithy/abort-controller/-/abort-controller-2.0.10.tgz", @@ -4572,6 +4602,27 @@ "deprecated": "Please use @jridgewell/sourcemap-codec instead", "dev": true }, + "node_modules/stack-utils": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz", + "integrity": "sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==", + "dev": true, + "dependencies": { + "escape-string-regexp": "^2.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/stack-utils/node_modules/escape-string-regexp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", + "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/stacktracey": { "version": "2.1.8", "resolved": "https://registry.npmjs.org/stacktracey/-/stacktracey-2.1.8.tgz", @@ -4832,6 +4883,15 @@ "fsevents": "~2.3.3" } }, + "node_modules/tunnel": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", + "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==", + "dev": true, + "engines": { + "node": ">=0.6.11 <=0.7.0 || >=0.7.3" + } + }, "node_modules/type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", diff --git a/package.json b/package.json index c6ba64f..f9e7ac4 100644 --- a/package.json +++ b/package.json @@ -8,13 +8,14 @@ "format": "prettier --check --write \"**/*.{ts,js,json,md,hbs}\"", "prettier": "prettier --check \"**/*.{ts,js,json,md,hbs}\"", "lint": "eslint ./src", - "test:unit": "node --test --test-reporter spec --loader tsx ./tests/unit/util.test.ts", - "test:e2e": "wrangler deploy --dry-run --outdir=dist && node --test --test-reporter spec --loader tsx ./tests/e2e/index.test.ts", + "test:unit": "node --test --test-reporter=spec --loader=tsx ./tests/unit/index.test.ts", + "test:e2e": "wrangler deploy --dry-run --outdir=dist && node --test --test-reporter=spec --loader=tsx ./tests/e2e/index.test.ts", "build:handlebars": "node scripts/compile-handlebars.js" }, "devDependencies": { "@aws-sdk/client-s3": "^3.421.0", "@cloudflare/workers-types": "^4.20230922.0", + "@reporters/github": "^1.5.3", "@types/node": "^20.7.0", "@typescript-eslint/eslint-plugin": "^6.7.3", "@typescript-eslint/parser": "^6.7.3",