Skip to content

Commit

Permalink
Merge pull request eclipse-tractusx#723 from eclipse-tractusx/chore/f…
Browse files Browse the repository at this point in the history
…ix-cucumber-report

chore(workflows):[eclipse-tractusx#371] add workaround cucumber report token replacement
  • Loading branch information
ds-jhartmann authored Jun 24, 2024
2 parents a360050 + a8b312e commit dbed329
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/cucumber-integration-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,11 @@ jobs:
ADMIN_USER_API_KEY: ${{ secrets.adminUserApiKey }}
ISSUE_FILTER: ${{ inputs.executionFilter }}
CUCUMBER_PUBLISH_TOKEN: ${{ secrets.cucumberPublishToken }}
run: mvn clean verify -P cucumber -Dgroups="$ISSUE_FILTER" -pl irs-cucumber-tests -am --batch-mode 2> irs-cucumber-tests/report-banner.txt
# workaround replacement since injecting the token via environment variable does not work
run: |
sed -i "s/CUCUMBER_TOKEN_IRS_PLACEHOLDER/${CUCUMBER_PUBLISH_TOKEN}/g" irs-cucumber-tests/src/test/java/org/eclipse/tractusx/irs/cucumber/RunCucumberTest.java
mvn clean verify -P cucumber -Dgroups="$ISSUE_FILTER" -pl irs-cucumber-tests -am --batch-mode 2> irs-cucumber-tests/report-banner.txt
- name: Publish Cucumber Results
uses: EnricoMi/publish-unit-test-result-action@v2.16.1
Expand All @@ -56,6 +60,7 @@ jobs:
grep -E "^│.*│$" irs-cucumber-tests/report-banner.txt > irs-cucumber-tests/cucumber-report.txt
sed -i 's/│//g' irs-cucumber-tests/cucumber-report.txt
cat irs-cucumber-tests/cucumber-report.txt
cat irs-cucumber-tests/cucumber-report.txt >> $GITHUB_STEP_SUMMARY
- name: Find previous comment in PR
if: always() && github.event_name == 'pull_request'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,18 @@
import static io.cucumber.junit.platform.engine.Constants.ANSI_COLORS_DISABLED_PROPERTY_NAME;
import static io.cucumber.junit.platform.engine.Constants.GLUE_PROPERTY_NAME;
import static io.cucumber.junit.platform.engine.Constants.PLUGIN_PROPERTY_NAME;
import static io.cucumber.junit.platform.engine.Constants.PLUGIN_PUBLISH_ENABLED_PROPERTY_NAME;
import static io.cucumber.junit.platform.engine.Constants.PLUGIN_PUBLISH_TOKEN_PROPERTY_NAME;

import org.junit.platform.suite.api.ConfigurationParameter;
import org.junit.platform.suite.api.IncludeEngines;
import org.junit.platform.suite.api.SelectPackages;
import org.junit.platform.suite.api.Suite;

@Suite
@Suite(failIfNoTests = false)
@IncludeEngines("cucumber")
@SelectPackages("org.eclipse.tractusx.irs.cucumber")
@ConfigurationParameter(key = GLUE_PROPERTY_NAME, value = "org.eclipse.tractusx.irs.cucumber")
@ConfigurationParameter(key = PLUGIN_PUBLISH_ENABLED_PROPERTY_NAME, value = "true")
@ConfigurationParameter(key = PLUGIN_PUBLISH_TOKEN_PROPERTY_NAME, value = "CUCUMBER_TOKEN_IRS_PLACEHOLDER")
@ConfigurationParameter(key = ANSI_COLORS_DISABLED_PROPERTY_NAME, value = "true")
@ConfigurationParameter(key = PLUGIN_PROPERTY_NAME,
value = "pretty,junit:target/cucumber-junit-report.xml,html:target/report.html")
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<excludedGroups>INTEGRATION_TEST,INACTIVE</excludedGroups>
<excludedGroups>INTEGRATION_TEST,INACTIVE,Ignore</excludedGroups>
<properties>
<configurationParameters>
cucumber.execution.dry-run=true
Expand Down

0 comments on commit dbed329

Please sign in to comment.