From d7ae6a5e5f72ab8a5f4cbfbd3c00c9034b6981b8 Mon Sep 17 00:00:00 2001 From: Manolo Carrasco Date: Sun, 6 Aug 2023 14:24:29 +0200 Subject: [PATCH] chore: add GH actions for validating the project --- .github/workflows/validation.yml | 48 ++++++++++++++++++++++++++++++++ 1 file changed, 48 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..3da4bdc --- /dev/null +++ b/.github/workflows/validation.yml @@ -0,0 +1,48 @@ +name: Verify +on: + push: + branches: [master] + 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@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 + - uses: nanasess/setup-chromedriver@master + - name: Verify + run: | + mvn -B -V -ntp verify -Dcom.vaadin.testbench.Parameters.headless + - 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