From f61027fc0bc06cbd1018b03e4d5a8313f4badb69 Mon Sep 17 00:00:00 2001 From: Zhe Sun Date: Tue, 12 Aug 2025 15:52:19 +0300 Subject: [PATCH] chore: add GHA for project validation --- .github/workflows/validation.yml | 53 ++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 .github/workflows/validation.yml diff --git a/.github/workflows/validation.yml b/.github/workflows/validation.yml new file mode 100644 index 0000000..2106491 --- /dev/null +++ b/.github/workflows/validation.yml @@ -0,0 +1,53 @@ +name: Verify +on: + push: + branches: [main] + workflow_dispatch: + pull_request: +permissions: + contents: read +jobs: + verify: + runs-on: ubuntu-latest + permissions: + # for EnricoMi/publish-unit-test-result-action + issues: read + checks: write + pull-requests: write + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: '21' + chrome-driver: true + - uses: actions/setup-java@v4 + with: + java-version: '18' + 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@v4 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: ${{ runner.os }}-maven- + - name: Verify + run: | + mvn -B -V -ntp verify -DuseLocalWebDriver=true -Dcom.vaadin.testbench.Parameters.runLocally=chrome -Dheadless + - name: Publish Test Results + uses: EnricoMi/publish-unit-test-result-action@v2 + with: + files: "**/target/*-reports/TEST*.xml" + check_run_annotations: all tests, skipped tests + check_run_annotations_branch: v24 + - if: ${{always()}} + uses: actions/upload-artifact@v4 + with: + name: files + path: | + **/error-screenshots + retention-days: 7