Skip to content

Commit

Permalink
dark-bdd is included
Browse files Browse the repository at this point in the history
  • Loading branch information
pnatashap committed Nov 2, 2022
1 parent 3c8128a commit 92f4afc
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 13 deletions.
35 changes: 28 additions & 7 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
name: Java CI with Maven
env:
ALLURE_VERSION: "2.10.0"
SUREFIRE_ARGS_BDD: "--add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.text=ALL-UNNAMED --add-opens=java.desktop/java.awt.font=ALL-UNNAMED"

on:
push:
Expand All @@ -19,28 +20,42 @@ jobs:
max-parallel: 1
fail-fast: false
matrix:
java: [ 8, 9, 10, 11, 12, 13, 14, 15 ] # doesn't work on 16
java: [ 8, 11, 13, 14, 15, 17, 18 ] # doesn't work on 16

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v1
uses: actions/setup-java@v3
with:
java-version: ${{ matrix.java }}
java-package: jdk
distribution: 'zulu'
cache: 'maven'

- name: Build with Maven
id: build
run: mvn install -DskipTests -ntp

- name: Set parameters for AspectJ
id: aspect_j_params
if: ${{ matrix.java > 15 }}
run: |
echo "ASPECT_ARGS_BDD=-Daspectj.args="\"$SUREFIRE_ARGS_BDD\" >> $GITHUB_ENV
- name: Set parameters for AspectJ
id: aspect_j_params_empty
if: ${{ matrix.java < 16 }}
run: |
echo "ASPECT_ARGS_BDD=-Daspectj.args=''" >> $GITHUB_ENV
- name: Tests
id: ftests
timeout-minutes: 10
if: github.event_name == 'pull_request' && success()
run: mvn test -ntp
run: mvn test -ntp ${{ env.ASPECT_ARGS_BDD }} --fail-at-end

- name: Get Allure history
uses: actions/checkout@v2
uses: actions/checkout@v3
id: allure-setup
continue-on-error: true
if: github.event_name == 'pull_request' && failure()
Expand All @@ -65,8 +80,14 @@ jobs:

- name: Deploy Allure report to Github Pages
if: github.event_name == 'pull_request' && always()
uses: peaceiris/actions-gh-pages@v2
uses: peaceiris/actions-gh-pages@v3
env:
PERSONAL_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PUBLISH_BRANCH: gh-pages
PUBLISH_DIR: allure-history
PUBLISH_DIR: allure-history

- name: Check tests are passed
if: ${{ steps.ftests.outcome != 'success' }}
run: |
echo Tests result: ${{ steps.ftests.outcome }}
exit 1
12 changes: 6 additions & 6 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,22 @@
<includeTags>@smoke</includeTags>
<excludeTags>@skip</excludeTags>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<aspectj.version>1.9.6</aspectj.version>
<aspectj.version>1.9.7</aspectj.version>
<allure.maven.version>2.10.0</allure.maven.version>
<allure.cucumber.jvm.version>2.13.1</allure.cucumber.jvm.version>
<allure.common.version>2.13.1</allure.common.version>
<surefire.version>2.22.1</surefire.version>
<jdi-dark.version>1.1.10</jdi-dark.version>
<jdi-dark.version>1.1.1</jdi-dark.version>
<profile.val>test</profile.val>
<!-- - - add-opens java.base/java.lang=ALL-UNNAMED is needed for JDK 16+ -->
<aspectj.args></aspectj.args>
</properties>

<dependencies>
<!--JDI-->
<dependency>
<groupId>com.epam.jdi</groupId>
<artifactId>jdi-dark</artifactId>
<artifactId>jdi-dark-bdd</artifactId>
<version>${jdi-dark.version}</version>
</dependency>
<dependency>
Expand Down Expand Up @@ -69,6 +71,7 @@
</suiteXmlFiles>
<testFailureIgnore>true</testFailureIgnore>
<argLine>
${aspectj.args}
-javaagent:"${settings.localRepository}/org/aspectj/aspectjweaver/${aspectj.version}/aspectjweaver-${aspectj.version}.jar"
-Dcucumber.options="--plugin io.qameta.allure.cucumber4jvm.AllureCucumber4Jvm"
</argLine>
Expand Down Expand Up @@ -112,9 +115,6 @@
<properties>
<allure.results.directory>${project.build.directory}/allure-results</allure.results.directory>
</properties>
<properties>
<allure.link.issue.pattern>https://example.org/issue/{}</allure.link.issue.pattern>
</properties>
</configuration>
</plugin>
</plugins>
Expand Down

0 comments on commit 92f4afc

Please sign in to comment.