Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update to 24.1.4, add GH action workflow #51

Merged
merged 12 commits into from
Aug 8, 2023
56 changes: 56 additions & 0 deletions .github/workflows/validation.yml
mcollovati marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Verify
on:
push:
branches: [master]
pull_request:
permissions:
contents: read
defaults:
run:
shell: bash
concurrency:
group: ${{ github.head_ref || github.ref_name }}
cancel-in-progress: true
jobs:
verify:
strategy:
matrix:
os: [ubuntu, windows]
runs-on: ${{ matrix.os }}-latest
permissions:
# for EnricoMi/publish-unit-test-result-action
issues: read
checks: write
pull-requests: write
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18'
- uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: Set TB License
run: |
TBL=${{ secrets.TB_LICENSE }}
[ -z "$TBL" ] && echo "No TB license provided" && exit 1
mkdir -p ~/.vaadin/
echo '{"username":"'`echo $TBL | cut -d / -f1`'","proKey":"'`echo $TBL | cut -d / -f2`'"}' > ~/.vaadin/proKey
- uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-maven-
- uses: browser-actions/setup-chrome@latest
with:
chrome-version: stable
- name: Verify
run: |
mvn -B -V -ntp verify -Dcom.vaadin.testbench.Parameters.headless
- name: Publish Test Results
if: matrix.os == 'ubuntu'
uses: EnricoMi/publish-unit-test-result-action@v2
with:
files: "**/target/*-reports/TEST*.xml"
check_run_annotations: all tests, skipped tests
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
/target/
frontend/
src/test/screenshots/
.idea/
.settings
.project
Expand All @@ -17,4 +19,4 @@ vite.generated.ts
drivers/
# Error screenshots generated by TestBench for failed integration tests
error-screenshots/
webpack.generated.js
webpack.generated.js
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,14 @@ one is probably Maven and the jetty-maven-plugin:

mvn jetty:run

You can also verify the project in production mode by running:

mvn verify -Pproduction

Or deploy the application in production executing:

mvn jetty:run-war -Pproduction

### Sample code classes explained

The source code for the application to be tested, a desktop calculator
Expand All @@ -48,4 +56,4 @@ The screenshot comparison example in `src/test/java/com/vaadin/testbenchexample/
JUnit5 is supported since TestBench 9, examples can be found at `src/test/java/com/vaadin/testbenchexample/junit5`.

### TestBench together with Selenium-Jupiter
It is possible to use TestBench together with <a href="https://bonigarcia.dev/selenium-jupiter/">Selenium-Jupiter JUnit5 extension</a>, see example test at `src/test/java/com/vaadin/testbenchexample/junit5/SimpleCaseSeleniumIT`.
It is possible to use TestBench together with <a href="https://bonigarcia.dev/selenium-jupiter/">Selenium-Jupiter JUnit5 extension</a>, see example test at `src/test/java/com/vaadin/testbenchexample/junit5/SimpleCaseSeleniumIT`.
Loading