From c320d252e2f4c75c644142f2a522d0331dae9e35 Mon Sep 17 00:00:00 2001 From: Markus Bucher Date: Wed, 20 Dec 2023 18:02:51 +0100 Subject: [PATCH] WIP: test-result reporting --- .github/workflows/unit_tests.yml | 2 ++ jest.config.js | 6 ++++++ package.json | 4 +++- 3 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 jest.config.js diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index e983a1af..5a199f89 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/unit_tests.yml @@ -75,6 +75,8 @@ jobs: working-directory: ./foreman_acd run: | npm test + env: + CI: true - name: Run access permission test run: | bundle exec rake test TEST="test/unit/foreman/access_permissions_test.rb" diff --git a/jest.config.js b/jest.config.js new file mode 100644 index 00000000..d69e1960 --- /dev/null +++ b/jest.config.js @@ -0,0 +1,6 @@ +module.exports = { + reporters: [ + "default", + "jest-github-actions-reporter" + ] +}; diff --git a/package.json b/package.json index 40e70189..2b13cc73 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,7 @@ "babel-preset-env": "^1.6.0", "babel-preset-react": "^6.24.1", "jest": "^23.6.0", + "jest-github-actions-reporter": "^1.0.3", "jest-prop-type-error": "^1.1.0", "lodash": "^4.17.11", "react-redux-test-utils": "^0.1.1", @@ -25,7 +26,8 @@ "table-resolver": "^3.2.0" }, "scripts": { - "test": "node node_modules/.bin/jest --no-cache" + "test": "node node_modules/.bin/jest --no-cache", + "test-github-actions": "node node_modules/.bin/jest --no-cache --reporters=default,jest-github-actions-reporter" }, "repository": { "type": "git",