Skip to content

Commit

Permalink
chore: adapt GH actions workflow to run playwright tests
Browse files Browse the repository at this point in the history
  • Loading branch information
manolo committed May 28, 2024
1 parent 04d69ce commit 196df52
Showing 1 changed file with 13 additions and 19 deletions.
32 changes: 13 additions & 19 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
name: Verify
on:
push:
branches: [v24]
workflow_dispatch:
pull_request:
permissions:
contents: read
concurrency:
group: ${{ github.head_ref || github.ref_name }}
cancel-in-progress: true
jobs:
verify:
timeout-minutes: 60
Expand All @@ -14,7 +16,7 @@ jobs:
# for EnricoMi/publish-unit-test-result-action
issues: read
checks: write
pull-requests: write
pull-requests: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
Expand All @@ -24,33 +26,25 @@ jobs:
with:
java-version: '21'
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-
- name: Install browsers
run: |
npm install --ci
npx playwright install chromium --with-deps
npx playwright install-deps
- name: Verify
run: |
mvn -B -V -ntp verify -Dcom.vaadin.testbench.Parameters.headless -Pit,production
- name: Install Playwright Browsers
run: npx playwright install chromium --with-deps
- name: Run Playwright tests
run: npx playwright test
./mvnw -B -V -ntp verify -Pit,production
- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: playwright-report/
name: tests-report
path: target/**-reports
retention-days: 30
- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action@v1
with:
files: "**/target/*-reports/TEST*.xml"
check_run_annotations: all tests, skipped tests
check_run_annotations_branch: v24
files: "target/*-reports/TEST*.xml"

0 comments on commit 196df52

Please sign in to comment.