webhook #36
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will build a Java project with Maven | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven | |
name: Java CI with Maven | |
env: | |
ALLURE_VERSION: "2.10.0" | |
WITH_PARAMS: "-ntp -Ddriver=chrome" | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
repository_dispatch: | |
types: | |
- webhook | |
jobs: | |
build: | |
name: Tests on JDK | |
runs-on: ubuntu-20.04 | |
strategy: | |
max-parallel: 1 | |
fail-fast: false | |
matrix: | |
java: [ 11, 13, 14, 15, 17, 18 ] # all [8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up JDK ${{ matrix.java }} | |
uses: actions/setup-java@v3 | |
with: | |
java-version: ${{ matrix.java }} | |
java-package: jdk | |
distribution: 'zulu' | |
cache: 'maven' | |
- name: Build with Maven | |
id: build | |
run: mvn install -DskipTests -ntp | |
- name: Tests | |
id: ftests | |
timeout-minutes: 10 | |
continue-on-error: true | |
run: mvn verify $WITH_PARAMS -pl com.epam.jdi:jdi-bdd-no-po-tests --fail-at-end | |
- name: Get Allure history | |
uses: actions/checkout@v3 | |
id: allure-setup | |
continue-on-error: true | |
if: github.event_name == 'pull_request' && failure() | |
with: | |
ref: gh-pages | |
path: gh-pages | |
- name: Generate Allure report | |
uses: simple-elf/allure-report-action@master | |
with: | |
allure_results: target/allure-results | |
allure_report: target/allure-report | |
allure_history: allure-history | |
- name: Upload Allure report | |
uses: actions/upload-artifact@master | |
with: | |
name: Allure report | |
path: target/allure-report | |
- name: Deploy Allure report to Github Pages | |
uses: peaceiris/actions-gh-pages@v2 | |
env: | |
PERSONAL_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
PUBLISH_BRANCH: gh-pages | |
PUBLISH_DIR: allure-history | |
- name: Check tests are passed | |
if: ${{ steps.ftests.outcome != 'success' }} | |
run: | | |
echo Tests result: ${{ steps.ftests.outcome }} | |
exit 1 |