From 924a71d9b618d4d015c88c48c1d11c14a9d3879b Mon Sep 17 00:00:00 2001 From: andrejs Date: Fri, 6 Nov 2026 09:38:50 +0200 Subject: [PATCH] Replace allure javascript config with a static configuration file Update node version --- .github/workflows/build.yml | 8 ++++---- allurerc.mjs | 27 --------------------------- allurerc.yaml | 14 ++++++++++++++ docs/allure-agent-mode.md | 6 +++--- 4 files changed, 21 insertions(+), 34 deletions(-) delete mode 100644 allurerc.mjs create mode 100644 allurerc.yaml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ba3a15698..dc3629442 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -35,7 +35,7 @@ jobs: - uses: actions/setup-node@v7 with: - node-version: '20.x' + node-version: '24.x' - name: "Set up JDK" uses: actions/setup-java@v6 @@ -70,7 +70,7 @@ jobs: - name: "Run tests with Allure" if: always() - run: npx -y allure@3 run --config ./allurerc.mjs --rerun 2 --environment="${{ env.ALLURE_MATRIX_ENV }}" --dump="${{ env.ALLURE_TEST_DUMP_NAME }}" -- ./gradlew --no-build-cache cleanTest test $GRADLE_EXCLUDES + run: npx -y allure@3 run --config ./allurerc.yaml --rerun 2 --environment="${{ env.ALLURE_MATRIX_ENV }}" --dump="${{ env.ALLURE_TEST_DUMP_NAME }}" -- ./gradlew --no-build-cache cleanTest test $GRADLE_EXCLUDES - name: "Upload Allure test dump" if: always() @@ -98,7 +98,7 @@ jobs: - uses: actions/setup-node@v7 with: - node-version: '20.x' + node-version: '24.x' - name: "Download Allure dumps" uses: actions/download-artifact@v8 @@ -109,7 +109,7 @@ jobs: merge-multiple: true - name: "Generate Allure report" - run: npx -y allure@3 generate --config ./allurerc.mjs --dump="allure-results-*.zip" --output=./build/allure-report + run: npx -y allure@3 generate --config ./allurerc.yaml --dump="allure-results-*.zip" --output=./build/allure-report - name: "Post Allure summary" if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == false diff --git a/allurerc.mjs b/allurerc.mjs deleted file mode 100644 index d6b1276fe..000000000 --- a/allurerc.mjs +++ /dev/null @@ -1,27 +0,0 @@ -const { ALLURE_SERVICE_TOKEN } = process.env; - -const allureService = ALLURE_SERVICE_TOKEN - ? { - accessToken: ALLURE_SERVICE_TOKEN, - } - : undefined; - -export default { - name: "Allure Java", - output: "./build/allure-report", - plugins: { - awesome: { - options: { - groupBy: ["module"], - appendTitlePath: true, - publish: true, - }, - }, - testops: { - options: { - launchName: `Allure Java GitHub actions run (${new Date().toISOString()})`, - }, - }, - }, - ...(allureService ? { allureService } : {}), -}; diff --git a/allurerc.yaml b/allurerc.yaml new file mode 100644 index 000000000..95c2ffbd8 --- /dev/null +++ b/allurerc.yaml @@ -0,0 +1,14 @@ +name: Allure Java +output: ./build/allure-report +plugins: + awesome: + options: + groupBy: + - module + appendTitlePath: true + publish: true + testops: + options: + launchName: "${{ 'Allure Java GitHub actions run (' + date.iso + ')' }}" +allureService: + accessToken: "${{ has(env.ALLURE_SERVICE_TOKEN) ? env.ALLURE_SERVICE_TOKEN : '' }}" diff --git a/docs/allure-agent-mode.md b/docs/allure-agent-mode.md index 59d1d616d..7983e157c 100644 --- a/docs/allure-agent-mode.md +++ b/docs/allure-agent-mode.md @@ -50,9 +50,9 @@ Refresh this section when Allure, Gradle, test runners, Allure results paths, re - Result-path configuration: module `src/test/resources/allure.properties` files set `allure.results.directory=build/allure-results`. - Project labels: most modules set `allure.label.epic=#project.description#` and `allure.label.module=` in `allure.properties`. - Issue-link patterns: some modules define `allure.link.issue.pattern=https://github.com/allure-framework/allure-java/issues/{}`. -- Report config: `allurerc.mjs` configures the generated report name, output, grouping by module, publishing, and optional Allure Service token. -- CI Allure execution: `.github/workflows/build.yml` runs `npx -y allure@3 run --config ./allurerc.mjs --rerun 2 --environment= --dump= -- ./gradlew --no-build-cache cleanTest test`. -- CI report generation: `.github/workflows/build.yml` downloads Allure dumps, runs `npx -y allure@3 generate --config ./allurerc.mjs --dump="allure-results-*.zip" --output=./build/allure-report`, and posts a PR summary for same-repository pull requests. +- Report config: `allurerc.yaml` configures the generated report name, output, grouping by module, publishing, and optional Allure Service token. +- CI Allure execution: `.github/workflows/build.yml` runs `npx -y allure@3 run --config ./allurerc.yaml --rerun 2 --environment= --dump= -- ./gradlew --no-build-cache cleanTest test`. +- CI report generation: `.github/workflows/build.yml` downloads Allure dumps, runs `npx -y allure@3 generate --config ./allurerc.yaml --dump="allure-results-*.zip" --output=./build/allure-report`, and posts a PR summary for same-repository pull requests. ## Project Test-Design Conventions