diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index c37753d..a455416 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -1,45 +1,53 @@ -name: Validate +name: Verify on: push: - branches: [v24] + branches: [v24] workflow_dispatch: pull_request: +permissions: + contents: read jobs: - validate: - runs-on: windows-latest + verify: + runs-on: ubuntu-latest + permissions: + issues: read + checks: write + pull-requests: write steps: - - run: | - # INSTALL LICENSE - mkdir -p ~/.vaadin/ - echo '{"username":"'`echo ${{secrets.TB_LICENSE}} | cut -d / -f1`'","proKey":"'`echo ${{secrets.TB_LICENSE}} | cut -d / -f2`'"}' > ~/.vaadin/proKey - echo "${{secrets.SS_LICENSE}}" > ~/vaadin.spreadsheet.developer.license - shell: bash - - uses: browser-actions/setup-chrome@latest - with: - chrome-version: stable + - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: - node-version: '18' + node-version: '21' - uses: actions/setup-java@v4 with: - java-version: '17' + java-version: '18' distribution: 'temurin' - - uses: stCarolas/setup-maven@v5 + - 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: - maven-version: '3.9.0' - - run: | - mvn -ntp -B clean install -Pproduction,it \ - -Dcom.vaadin.testbench.Parameters.testsInParallel=2 \ - -Dmaven.test.redirectTestOutputToFile=true \ + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: ${{ runner.os }}-maven- + - name: Verify + run: | + mvn -B -V -ntp package -Pit,production \ -Dcom.vaadin.testbench.Parameters.headless=true -Dheadless \ - -Dmaven.compiler.showDeprecation - env: - MAVEN_ARGS: ${{env.MAVEN_ARGS}} - shell: bash - - if: ${{failure()}} - uses: actions/upload-artifact@v3.1.1 + -Dcom.vaadin.testbench.Parameters.testsInParallel=2 + - 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: failed-outputs - path: target - if-no-files-found: warn + name: files + path: | + **/error-screenshots retention-days: 7