Skip to content

Commit

Permalink
Allure test reports (#1894)
Browse files Browse the repository at this point in the history
* Allure test reports

* Allure test reports

* Allure test reports

* Allure test reports

* Allure test reports

* Allure test reports

* Allure test reports

* Allure test reports

* Allure test reports

* Allure test reports

* Allure test reports

* Allure test reports

* Allure test reports

* Allure test reports

* Allure test reports

* Allure test reports

* Allure test reports
  • Loading branch information
szczygiel-m authored Sep 19, 2024
1 parent 1b730c2 commit 83d575b
Show file tree
Hide file tree
Showing 23 changed files with 191 additions and 41 deletions.
23 changes: 0 additions & 23 deletions .github/workflows/ci-console.yml

This file was deleted.

82 changes: 82 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,35 @@ on:
branches: [ master ]

jobs:
console:
name: ci-console
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./hermes-console
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 20
- name: Run linter
run: yarn && yarn lint
- name: Run frontend tests
run: yarn test:unit
- name: Upload artifact
if: always() && github.ref == 'refs/heads/master'
uses: actions/upload-artifact@v4
with:
name: ci-console
path: ./hermes-console/allure-results
build:
runs-on: ubuntu-latest
strategy:
matrix:
tasks: [
# Add/remove task in Allure Report job also
{alias: "unitTests", name: "check"},
{alias: "integrationTests", name: "integrationTest"},
{alias: "slowIntegrationTests", name: "slowIntegrationTest"},
Expand Down Expand Up @@ -47,3 +71,61 @@ jobs:
with:
paths: '**/build/test-results/**/TEST-*.xml'
show: fail, skip
- name: Upload artifact
if: always() && github.ref == 'refs/heads/master' && matrix.tasks.alias != 'benchmark'
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.tasks.alias }}
path: build/allure-results

allureReport:
if: always() && github.ref == 'refs/heads/master'
name: Generate Allure Report
needs: [ build, console ]
runs-on: ubuntu-latest
steps:
- name: Download artifact unitTests
uses: actions/download-artifact@v4
if: always()
with:
name: unitTests
path: allure-results
- name: Download artifact integrationTests
uses: actions/download-artifact@v4
if: always()
with:
name: integrationTests
path: allure-results
- name: Download artifact slowIntegrationTests
uses: actions/download-artifact@v4
if: always()
with:
name: slowIntegrationTests
path: allure-results
- name: Download artifact ci-console
uses: actions/download-artifact@v4
if: always()
with:
name: ci-console
path: allure-results
- name: Load test report history
uses: actions/checkout@v4
if: always()
continue-on-error: true
with:
ref: gh-pages
path: gh-pages
- name: Build test report
uses: simple-elf/[email protected]
if: always()
with:
gh_pages: gh-pages
allure_history: allure-history
allure_results: allure-results
- name: Publish test report
uses: peaceiris/actions-gh-pages@v4
if: always()
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: allure-history
12 changes: 11 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ allprojects {
junit_jupiter : '5.10.2',
testcontainers : '1.19.8',
spring : '3.2.4',
assertj : '3.25.3'
assertj : '3.25.3',
allure : '2.24.0'
]

repositories {
Expand All @@ -80,6 +81,15 @@ allprojects {
implementation group: 'org.slf4j', name: 'slf4j-api', version: '2.0.4'
implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.14.0'

// Allure Spock adapter
testImplementation(platform("io.qameta.allure:allure-bom:${versions.allure}"))
testImplementation("io.qameta.allure:allure-spock2")
testImplementation("io.qameta.allure:allure-junit-platform")

// Spock framework
testImplementation(platform("org.spockframework:spock-bom:${versions.spock}"))
testImplementation("org.spockframework:spock-core")

testImplementation group: 'junit', name: 'junit', version: '4.11'
testImplementation group: 'com.tngtech.java', name: 'junit-dataprovider', version: '1.10.0'
testImplementation group: 'pl.pragmatists', name: 'JUnitParams', version: '1.0.2'
Expand Down
1 change: 0 additions & 1 deletion hermes-api/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ dependencies {
implementation group: 'com.sun.xml.bind', name: 'jaxb-impl', version: '4.0.5'
implementation group: 'jakarta.annotation', name: 'jakarta.annotation-api', version: '3.0.0'


testImplementation group: 'org.spockframework', name: 'spock-core', version: versions.spock
testImplementation group: 'org.spockframework', name: 'spock-junit4', version: versions.spock
testImplementation project(':hermes-test-helper')
Expand Down
1 change: 1 addition & 0 deletions hermes-api/src/test/resources/allure.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
allure.results.directory=../build/allure-results
1 change: 1 addition & 0 deletions hermes-client/src/test/resources/allure.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
allure.results.directory=../build/allure-results
1 change: 1 addition & 0 deletions hermes-common/src/test/resources/allure.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
allure.results.directory=../build/allure-results
1 change: 1 addition & 0 deletions hermes-console/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ pnpm-debug.log*
lerna-debug.log*

node_modules
allure-results
.DS_Store
dist
dist-ssr
Expand Down
3 changes: 2 additions & 1 deletion hermes-console/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@
"@vue/eslint-config-typescript": "13.0.0",
"@vue/test-utils": "2.4.5",
"@vue/tsconfig": "0.1.3",
"allure-commandline": "2.30.0",
"allure-vitest": "2.15.1",
"eslint": "8.57.0",
"eslint-plugin-sort-imports-es6-autofix": "0.6.0",
"eslint-plugin-vue": "9.25.0",
Expand All @@ -57,7 +59,6 @@
"sass": "1.75.0",
"typescript": "4.9.5",
"vite": "5.2.9",
"vite-plugin-rewrite-all": "1.0.1",
"vite-plugin-vuetify": "2.0.3",
"vitest": "1.5.0",
"vue-tsc": "2.0.13"
Expand Down
3 changes: 1 addition & 2 deletions hermes-console/vite.config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@
import { fileURLToPath, URL } from 'node:url';

import { defineConfig } from 'vite';
import pluginRewriteAll from 'vite-plugin-rewrite-all';
import vue from '@vitejs/plugin-vue';
import vuetify from 'vite-plugin-vuetify';

// https://vitejs.dev/config/
export default defineConfig({
plugins: [vue(), vuetify({ autoImport: true }), pluginRewriteAll()],
plugins: [vue(), vuetify({ autoImport: true })],
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url)),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { defineConfig } from 'vitest/config';
import { fileURLToPath, URL } from 'node:url';
import AllureReporter from 'allure-vitest/reporter';
import vue from '@vitejs/plugin-vue';
import vuetify from 'vite-plugin-vuetify';

Expand All @@ -17,6 +18,7 @@ export default defineConfig({
},
environment: 'jsdom',
globals: true,
setupFiles: ['vitest.setup.ts'],
setupFiles: ['vitest.setup.ts', 'allure-vitest/setup'],
reporters: ['default', new AllureReporter({})],
},
});
74 changes: 62 additions & 12 deletions hermes-console/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -958,13 +958,39 @@ ajv@^6.12.4:
json-schema-traverse "^0.4.1"
uri-js "^4.2.2"

[email protected]:
version "2.30.0"
resolved "https://registry.yarnpkg.com/allure-commandline/-/allure-commandline-2.30.0.tgz#c121021d263cad2474ec0fd7490de4d3c65a06f3"
integrity sha512-qSaGG/I8P38q8gufnxvEog+IrIeCick+PJxxoTp5Vh/L8kviymIfv3A7fvYWziOqZ/oDywyOuNFMEfPZiiKwAA==

[email protected]:
version "2.15.1"
resolved "https://registry.yarnpkg.com/allure-js-commons/-/allure-js-commons-2.15.1.tgz#570285472c80759017de699035218821fd12a7d3"
integrity sha512-5V/VINplbu0APnfSZOkYpKOzucO36Q2EtTD1kqjWjl7n6tj7Hh+IHCZsH3Vpk/LXRDfj9RuXugBBvwYKV5YMJw==
dependencies:
md5 "^2.3.0"
properties "^1.2.1"
strip-ansi "^5.2.0"

[email protected]:
version "2.15.1"
resolved "https://registry.yarnpkg.com/allure-vitest/-/allure-vitest-2.15.1.tgz#2befeae639450bccf4c7fdc60b936779ca7b6d3a"
integrity sha512-/G2lVJzUP5VB7AEDKy/KoU7z8JNNtPwXDNV4ZzSus3/QLzYVayVYpJd3S1XZbNrULK23z8PWUufBGQD8nIdjZA==
dependencies:
allure-js-commons "2.15.1"

ansi-escapes@^4.3.2:
version "4.3.2"
resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.2.tgz#6b2291d1db7d98b6521d5f1efa42d0f3a9feb65e"
integrity sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==
dependencies:
type-fest "^0.21.3"

ansi-regex@^4.1.0:
version "4.1.1"
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.1.tgz#164daac87ab2d6f6db3a29875e2d1766582dabed"
integrity sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==

ansi-regex@^5.0.1:
version "5.0.1"
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304"
Expand Down Expand Up @@ -1186,6 +1212,11 @@ chalk@^4.0.0, chalk@^4.1.0, chalk@^4.1.2:
ansi-styles "^4.1.0"
supports-color "^7.1.0"

[email protected]:
version "0.0.2"
resolved "https://registry.yarnpkg.com/charenc/-/charenc-0.0.2.tgz#c0a1d2f3a7092e03774bfa83f14c0fc5790a8667"
integrity sha512-yrLQ/yVUFXkzg7EDQsPieE/53+0RlaWTs+wBrvW36cyilJ2SaDWfl4Yj7MtLTXleV9uEKefbAGUPv2/iWSooRA==

check-error@^1.0.3:
version "1.0.3"
resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.3.tgz#a6502e4312a7ee969f646e83bb3ddd56281bd694"
Expand Down Expand Up @@ -1301,11 +1332,6 @@ config-chain@^1.1.13:
ini "^1.3.4"
proto-list "~1.2.1"

connect-history-api-fallback@^1.6.0:
version "1.6.0"
resolved "https://registry.yarnpkg.com/connect-history-api-fallback/-/connect-history-api-fallback-1.6.0.tgz#8b32089359308d111115d81cad3fceab888f97bc"
integrity sha512-e54B99q/OUoH64zYYRf3HBP5z24G38h5D3qXu23JGRoigpX5Ss4r9ZnDk3g0Z8uQC2x2lPaJ+UlWBc1ZWBWdLg==

connect-pause@^0.1.1:
version "0.1.1"
resolved "https://registry.yarnpkg.com/connect-pause/-/connect-pause-0.1.1.tgz#b269b2bb82ddb1ac3db5099c0fb582aba99fb37a"
Expand Down Expand Up @@ -1361,6 +1387,11 @@ cross-spawn@^7.0.0, cross-spawn@^7.0.2, cross-spawn@^7.0.3:
shebang-command "^2.0.0"
which "^2.0.1"

[email protected]:
version "0.0.2"
resolved "https://registry.yarnpkg.com/crypt/-/crypt-0.0.2.tgz#88d7ff7ec0dfb86f713dc87bbb42d044d3e6c41b"
integrity sha512-mCxBlsHFYh9C+HVpiEacem8FEBnMXgU9gy4zmNC+SXAZNB/1idgp/aulFJ4FgCi7GPEVbfyng092GqL2k2rmow==

css.escape@^1.5.1:
version "1.5.1"
resolved "https://registry.yarnpkg.com/css.escape/-/css.escape-1.5.1.tgz#42e27d4fa04ae32f931a4b4d4191fa9cddee97cb"
Expand Down Expand Up @@ -2440,6 +2471,11 @@ is-boolean-object@^1.1.0:
call-bind "^1.0.2"
has-tostringtag "^1.0.0"

is-buffer@~1.1.6:
version "1.1.6"
resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be"
integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==

is-callable@^1.1.3, is-callable@^1.1.4, is-callable@^1.2.7:
version "1.2.7"
resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.7.tgz#3bc2a85ea742d9e36205dcacdd72ca1fdc51b055"
Expand Down Expand Up @@ -2831,6 +2867,15 @@ magic-string@^0.30.5, magic-string@^0.30.8:
dependencies:
"@jridgewell/sourcemap-codec" "^1.4.15"

md5@^2.3.0:
version "2.3.0"
resolved "https://registry.yarnpkg.com/md5/-/md5-2.3.0.tgz#c3da9a6aae3a30b46b7b0c349b87b110dc3bda4f"
integrity sha512-T1GITYmFaKuO91vxyoQMFETst+O71VUPEU3ze5GNzDm0OWdP8v1ziTaAEPUr/3kLsY3Sftgz242A1SetQiDL7g==
dependencies:
charenc "0.0.2"
crypt "0.0.2"
is-buffer "~1.1.6"

[email protected]:
version "0.3.0"
resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748"
Expand Down Expand Up @@ -3421,6 +3466,11 @@ pretty-format@^29.7.0:
ansi-styles "^5.0.0"
react-is "^18.0.0"

properties@^1.2.1:
version "1.2.1"
resolved "https://registry.yarnpkg.com/properties/-/properties-1.2.1.tgz#0ee97a7fc020b1a2a55b8659eda4aa8d869094bd"
integrity sha512-qYNxyMj1JeW54i/EWEFsM1cVwxJbtgPp8+0Wg9XjNaK6VE/c4oRi6PNu5p7w1mNXEIQIjV5Wwn8v8Gz82/QzdQ==

proto-list@~1.2.1:
version "1.2.4"
resolved "https://registry.yarnpkg.com/proto-list/-/proto-list-1.2.4.tgz#212d5bfe1318306a420f6402b8e26ff39647a849"
Expand Down Expand Up @@ -3918,6 +3968,13 @@ string.prototype.trimstart@^1.0.6:
dependencies:
ansi-regex "^5.0.1"

strip-ansi@^5.2.0:
version "5.2.0"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae"
integrity sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==
dependencies:
ansi-regex "^4.1.0"

strip-ansi@^6.0.0, strip-ansi@^6.0.1:
version "6.0.1"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
Expand Down Expand Up @@ -4195,13 +4252,6 @@ [email protected]:
picocolors "^1.0.0"
vite "^5.0.0"

[email protected]:
version "1.0.1"
resolved "https://registry.yarnpkg.com/vite-plugin-rewrite-all/-/vite-plugin-rewrite-all-1.0.1.tgz#ee711a3d114634abb922a0e50e56736d7e9a324a"
integrity sha512-W0DAchC8ynuQH0lYLIu5/5+JGfYlUTRD8GGNtHFXRJX4FzzB9MajtqHBp26zq/ly9sDt5BqrfdT08rv3RbB0LQ==
dependencies:
connect-history-api-fallback "^1.6.0"

[email protected]:
version "2.0.3"
resolved "https://registry.yarnpkg.com/vite-plugin-vuetify/-/vite-plugin-vuetify-2.0.3.tgz#b65ee4e05cfc6bf2b478a32b6d58b42398519f1e"
Expand Down
1 change: 1 addition & 0 deletions hermes-consumers/src/test/resources/allure.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
allure.results.directory=../build/allure-results
1 change: 1 addition & 0 deletions hermes-frontend/src/test/resources/allure.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
allure.results.directory=../build/allure-results
1 change: 1 addition & 0 deletions hermes-management/src/test/resources/allure.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
allure.results.directory=../build/allure-results
1 change: 1 addition & 0 deletions hermes-metrics/src/test/resources/allure.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
allure.results.directory=../build/allure-results
1 change: 1 addition & 0 deletions hermes-mock/src/test/resources/allure.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
allure.results.directory=../build/allure-results
1 change: 1 addition & 0 deletions hermes-schema/src/test/resources/allure.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
allure.results.directory=../build/allure-results
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
allure.results.directory=../build/allure-results
1 change: 1 addition & 0 deletions hermes-tracker/src/test/resources/allure.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
allure.results.directory=../build/allure-results
Loading

0 comments on commit 83d575b

Please sign in to comment.