Skip to content

Commit

Permalink
Added Integration Test step.
Browse files Browse the repository at this point in the history
  • Loading branch information
mbien committed Dec 25, 2021
1 parent 2c6d1bb commit 85d3589
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
17 changes: 15 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,25 @@ jobs:
- name: Checkout Project
uses: actions/checkout@v2

- name: Build Roller and run Tests
- name: Build Roller and run JUnit Tests
run: mvn -V -ntp install

- name: Publish Test Report
- name: Run Integration Tests
run: |
cd it-selenium
bash -c "wget -c https://github.com/mozilla/geckodriver/releases/download/v0.30.0/geckodriver-v0.30.0-linux64.tar.gz -O - | tar -xz"
mvn -V -ntp install
- name: Publish JUnit Report
uses: mikepenz/action-junit-report@v2
if: always()
with:
check_name: JUnit Reports for Linux/JDK ${{ matrix.java }}
report_paths: 'app/target/surefire-reports/TEST-*.xml'

- name: Publish IT Report
uses: mikepenz/action-junit-report@v2
if: always()
with:
check_name: IT Reports for Linux/JDK ${{ matrix.java }}
report_paths: 'it-selenium/target/failsafe-reports/TEST-*.xml'
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
*/
package org.apache.roller.selenium;

import java.awt.GraphicsEnvironment;
import java.util.concurrent.TimeUnit;
import org.apache.roller.selenium.core.CreateWeblogPage;
import org.apache.roller.selenium.core.LoginPage;
Expand Down Expand Up @@ -55,6 +56,9 @@ public void setUp() throws Exception {
profile.setPreference("intl.accept_languages", "en_US");

FirefoxOptions options = new FirefoxOptions();
if (GraphicsEnvironment.isHeadless()) {
options.addArguments("-headless");
}
options.setProfile(profile);

driver = new FirefoxDriver(options);
Expand Down

0 comments on commit 85d3589

Please sign in to comment.