Skip to content

test: increase timeout while waiting for push response #647

test: increase timeout while waiting for push response

test: increase timeout while waiting for push response #647

Workflow file for this run

name: Quarkus Hilla Validation
on:
push:
branches: [main, '1.0']
workflow_dispatch:
pull_request_target:
types: [opened, synchronize, reopened, edited]
permissions:
contents: read
issues: read
checks: write
pull-requests: write
concurrency:
group: ${{ github.head_ref || github.ref_name }}
cancel-in-progress: true
env:
JAVA_VERSION: 17
jobs:
check-permissions:
name: Check User Permissions
runs-on: ubuntu-latest
steps:
- run: echo "Concurrency Group = ${{ github.head_ref || github.ref_name }}"
- uses: actions-cool/check-user-permission@main
id: checkUser
with:
username: ${{github.triggering_actor}}
require: 'write'
- name: Fail on workflow triggered by external contributor
if: ${{ steps.checkUser.outputs.require-result != 'true' && github.actor != 'dependabot[bot]' && github.actor != 'quarkus-hilla-bot[bot]' }}
run: |
echo "🚫 **${{ github.actor }}** is an external contributor, a **${{ github.repository }}** team member has to review this changes and re-run this build" \
| tee -a $GITHUB_STEP_SUMMARY && exit 1
changes:
name: Compute changes
needs: [check-permissions]
runs-on: ubuntu-latest
outputs:
validation-required: ${{ steps.filter.outputs.validate }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
validate:
- '!(README.md|LICENSE|.gitignore|etc/**)'
build-and-test:
name: Build and test
needs: [changes]
if: ${{ needs.changes.outputs.validation-required == 'true' }}
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Set up Java
uses: actions/setup-java@v3
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: 'temurin'
cache: maven
- uses: browser-actions/setup-chrome@latest
id: setup-chrome
with:
chrome-version: stable
- name: Build
run: |
set -x -e -o pipefail
mvn -V -e -B -ntp -DskipTests -Dmaven.javadoc.skip=false install
- name: Test
run: |
set -x -e -o pipefail
mvn -V -e -B -ntp verify -Dmaven.javadoc.skip=false -DtrimStackTrace=false
- name: Package test output files
if: ${{ failure() || success() }}
run: find . -name surefire-reports -o -name failsafe-reports -o -name error-screenshots | tar -czf tests-report-main.tgz -T -
- uses: actions/upload-artifact@v3
if: ${{ failure() || success() }}
with:
name: tests-output
path: tests-report-*.tgz
e2e-dev-tests:
name: End-to-end tests (Development)
needs: [changes]
if: ${{ needs.changes.outputs.validation-required == 'true' }}
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Set up Java
uses: actions/setup-java@v3
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: 'temurin'
cache: maven
- uses: browser-actions/setup-chrome@latest
id: setup-chrome
with:
chrome-version: stable
- name: Build
run: |
set -x -e -o pipefail
mvn -V -e -B -ntp -DskipTests -Dmaven.javadoc.skip=false install
- name: End-to-end Test (Development mode)
run: |
set -x -e -o pipefail
mvn -V -e -B -ntp verify -Dmaven.javadoc.skip=false -DtrimStackTrace=false -Dselenide.browserBinary=${{ steps.setup-chrome.outputs.chrome-path }} -Pit-tests
- name: Package test output files
if: ${{ failure() || success() }}
run: find . -name surefire-reports -o -name failsafe-reports -o -name error-screenshots | tar -czf tests-report-e2e-dev.tgz -T -
- uses: actions/upload-artifact@v3
if: ${{ failure() || success() }}
with:
name: tests-output
path: tests-report-*.tgz
e2e-prod-tests:
name: End-to-end tests (Production)
needs: [changes]
if: ${{ needs.changes.outputs.validation-required == 'true' }}
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Set up Java
uses: actions/setup-java@v3
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: 'temurin'
cache: maven
- uses: browser-actions/setup-chrome@latest
id: setup-chrome
with:
chrome-version: stable
- name: Build
run: |
set -x -e -o pipefail
mvn -V -e -B -ntp -DskipTests -Dmaven.javadoc.skip=false install
- name: End-to-end Test (Production mode)
run: |
set -x -e -o pipefail
mvn -V -e -B -ntp verify -Dmaven.javadoc.skip=false -DtrimStackTrace=false -Dselenide.browserBinary=${{ steps.setup-chrome.outputs.chrome-path }} -Pit-tests,production
- name: Package test output files
if: ${{ failure() || success() }}
run: find . -name surefire-reports -o -name failsafe-reports -o -name error-screenshots | tar -czf tests-report-e2e-prod.tgz -T -
- uses: actions/upload-artifact@v3
if: ${{ failure() || success() }}
with:
name: tests-output
path: tests-report-*.tgz
test-results:
permissions:
issues: read
checks: write
pull-requests: write
if: ${{ always() }}
needs: [changes, build-and-test, e2e-dev-tests, e2e-prod-tests]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
- uses: actions/download-artifact@v3
if: ${{ always() && needs.changes.outputs.validation-required == 'true' }}
with:
name: tests-output
- name: Extract downloaded files
if: ${{ always() && needs.changes.outputs.validation-required == 'true' }}
run: for i in *.tgz; do tar xvf $i; done
- name: Publish Unit Test Results
if: ${{ always() && needs.changes.outputs.validation-required == 'true' }}
uses: EnricoMi/publish-unit-test-result-action@v2
with:
junit_files: "**/target/*-reports/TEST*.xml"
- name: Set Failure Status
if: ${{ always() && needs.changes.outputs.validation-required == 'true' && (needs.build-and-test.result != 'success' || needs.e2e-dev-tests.result != 'success' || needs.e2e-prod-tests.result != 'success') }}
run: |
echo "🚫 THERE ARE TEST MODULES WITH FAILURES or BEEN CANCELLED" | tee -a $GITHUB_STEP_SUMMARY
exit 1
- name: Set validation skipped status
if: ${{ always() && needs.changes.outputs.validation-required == 'false' }}
run: |
echo "✅ Pull request only contains changes on files ignored by validation workflow" | tee -a $GITHUB_STEP_SUMMARY && exit 0