Skip to content

Commit

Permalink
skip ui tests in default build job
Browse files Browse the repository at this point in the history
  • Loading branch information
bseber committed Nov 17, 2024
1 parent c58c513 commit 188da50
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 17 deletions.
12 changes: 1 addition & 11 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,8 @@ jobs:
java-version: 21
cache: 'maven'

- name: Install Playwright Browsers (UI tests)
run: ./mvnw exec:java -e -D exec.mainClass=com.microsoft.playwright.CLI -D exec.classpathScope="test" -D exec.args="install --with-deps chromium"

- name: Build
run: ./mvnw -Pcoverage dependency:go-offline clean verify
run: ./mvnw -Pcoverage dependency:go-offline clean verify -Dgroups="\!ui"

- name: Analyse with SonarCloud
if: ${{ github.event_name != 'pull_request' || (github.event.pull_request.head.repo.full_name == github.repository && github.actor != 'dependabot[bot]') }}
Expand All @@ -58,13 +55,6 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

- name: Upload artifacts of failed tests
uses: actions/upload-artifact@v4
if: always()
with:
name: failed-ui-tests
path: target/ui-test/**/FAILED-*

ui-test:
name: UI Test
runs-on: ubuntu-20.04
Expand Down
7 changes: 1 addition & 6 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -446,12 +446,7 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<configuration>
<excludes>
<exclude>none</exclude>
</excludes>
<includes>
<include>**/*UIIT.java</include>
</includes>
<groups>ui</groups>
</configuration>
</plugin>
</plugins>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import com.microsoft.playwright.junit.Options;
import com.microsoft.playwright.junit.OptionsFactory;
import com.microsoft.playwright.junit.UsePlaywright;
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.test.context.ContextConfiguration;

Expand Down Expand Up @@ -52,6 +53,7 @@
@UsePlaywright(UiTest.CustomOptions.class)
@ExtendWith({ PlaywrightTraceExtension.class, TestRecordVideoExtension.class })
@ContextConfiguration(initializers = UITestInitializer.class)
@Tag("ui")
public @interface UiTest {

class CustomOptions implements OptionsFactory {
Expand Down

0 comments on commit 188da50

Please sign in to comment.