Skip to content

Commit

Permalink
Run UI tests on trigger release workflow (#962)
Browse files Browse the repository at this point in the history
Here are some things you should have thought about:

**Multi-Tenancy**
- [ ] Extended new entities with `AbstractTenantAwareEntity`?
- [ ] New entity added to `TenantAwareDatabaseConfiguration`?
- [ ] Tested with `dev-multitenant` profile?

<!--

Thanks for contributing to the zeiterfassung.
Please review the following notes before submitting you pull request.

Please look for other issues or pull requests which already work on this
topic. Is somebody already on it? Do you need to synchronize?

# Security Vulnerabilities

🛑 STOP! 🛑 If your contribution fixes a security vulnerability, please do
not submit it.
Instead, please write an E-Mail to info@focus-shift.de with all the
information
to recreate the security vulnerability.

# Describing Your Changes

If, having reviewed the notes above, you're ready to submit your pull
request, please
provide a brief description of the proposed changes.

If they:
🐞 fix a bug, please describe the broken behaviour and how the changes
fix it.
    Please label with 'type: bug' and 'status: new'
    
🎁 make an enhancement, please describe the new functionality and why you
believe it's useful.
    Please label with 'type: enhancement' and 'status: new'
 
If your pull request relates to any existing issues,
please reference them by using the issue number prefixed with #.

-->
  • Loading branch information
derTobsch authored Nov 21, 2024
2 parents 89a404f + bcef5cb commit 6642e3d
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 6 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,6 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up JDK 21
uses: actions/setup-java@v4
Expand Down
49 changes: 45 additions & 4 deletions .github/workflows/release-trigger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ env:
MAVEN_ARGS: "--no-transfer-progress --errors --fail-at-end --show-version"

jobs:
trigger-release:
run-unit-and-integration-tests:
name: "Run unit and integration tests"
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
Expand All @@ -33,11 +34,51 @@ jobs:
java-version: 21
cache: 'maven'

- name: Build
run: ./mvnw verify -Dgroups="!ui"

run-ui-test:
name: "Run UI tests"
runs-on: ubuntu-24.04
strategy:
matrix:
browser: ["chromium", "firefox", "webkit"]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-ui-test-${{ matrix.browser }}
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: 'liberica'
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"
run: ./mvnw exec:java -e -D exec.mainClass=com.microsoft.playwright.CLI -D exec.classpathScope="test" -D exec.args="install --with-deps ${{matrix.browser}}"

- name: Build
run: ./mvnw verify
- name: Test
run: ./mvnw dependency:go-offline verify -Pui-test -Dbrowser=${{matrix.browser}}

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

create-tag-and-release-notes:
name: "Create tag and release notes"
needs:
- run-unit-and-integration-tests
- run-ui-test
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false

- name: Setup git user
uses: fregante/setup-git-user@v2
Expand Down

0 comments on commit 6642e3d

Please sign in to comment.