Skip to content

Commit

Permalink
chore: add different locations for html, xml reports
Browse files Browse the repository at this point in the history
  • Loading branch information
roopeshh committed Nov 8, 2024
1 parent cd32057 commit 0c5e9d3
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 18 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/api-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "22"
node-version: '22'

- name: Install dependencies
run: yarn
Expand All @@ -26,18 +26,18 @@ jobs:
if: always()
with:
name: test-report
path: ./report/
path: ./html-report/
- name: Upload xml reports
uses: actions/upload-artifact@v4
if: always()
with:
name: test-report
path: ./report/junit-report.xml
path: ./xml-report/junit-report.xml
- name: API Test Report
uses: dorny/test-reporter@v1
if: always()
with:
name: API Test Report
path: ./report/junit-report.xml
path: ./xml-report/junit-report.xml
reporter: java-junit
fail-on-error: true
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
node_modules
report
html-report
xml-report
3 changes: 2 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
node_modules
report
html-report
xml-report
20 changes: 10 additions & 10 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
const js = require("@eslint/js");
const tseslint = require("typescript-eslint");
const prettierPlugin = require("eslint-plugin-prettier");
const prettierConfig = require("eslint-config-prettier");
const js = require('@eslint/js');
const tseslint = require('typescript-eslint');
const prettierPlugin = require('eslint-plugin-prettier');
const prettierConfig = require('eslint-config-prettier');

module.exports = [
js.configs.recommended,
...tseslint.configs.recommended,
prettierConfig,
{
files: ["**/*.js", "**/*.ts"],
ignores: ["node_modules/**", "report/**"],
files: ['**/*.js', '**/*.ts'],
ignores: ['node_modules/**', 'html-report/**', 'xml-report/**'],
languageOptions: {
parser: tseslint.parser,
parserOptions: {
ecmaVersion: 2020,
sourceType: "module",
project: "./tsconfig.json",
sourceType: 'module',
project: './tsconfig.json',
},
},
plugins: {
"@typescript-eslint": tseslint.plugin,
'@typescript-eslint': tseslint.plugin,
prettier: prettierPlugin,
},
rules: {
"prettier/prettier": "error",
'prettier/prettier': 'error',
},
},
];
4 changes: 2 additions & 2 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ module.exports = {
[
'jest-html-reporters',
{
publicPath: './report',
publicPath: './html-report',
filename: 'report.html',
},
],
[
'jest-junit',
{
outputDirectory: './report',
outputDirectory: './xml-report',
outputName: 'junit-report.xml',
},
],
Expand Down

0 comments on commit 0c5e9d3

Please sign in to comment.