Skip to content

Fail test for testing purposes. #33

Fail test for testing purposes.

Fail test for testing purposes. #33

Workflow file for this run

name: Build
#on: [push]
on:
push:
branches: [githubtest]
# pull_request:
# branches: [main]
env:
INTEGRATION_TESTS_SECRETS_ENV: ${{ secrets.INTEGRATION_TESTS_SECRETS_ENV }}
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
cache: 'gradle'
- name: Build with Gradle
run: |
./gradlew --no-daemon assemble
test:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
cache: 'gradle'
- name: Prepare env
run: |
echo ${INTEGRATION_TESTS_SECRETS_ENV} | base64 -d > tests/config/secrets.env
- name: Build with Gradle
run: ./gradlew --no-daemon --continue test
# - uses: actions/upload-artifact@v4
# if: always()
# with:
# name: test-reports
# path: '**/TEST-*.xml'
- name: Test Report
uses: dorny/test-reporter@v1
if: always() # run this step even if previous step failed
with:
name: Junit Tests # Name of the check run which will be created
path: '**/TEST-*.xml' # Path to test results
reporter: java-junit # Format
list-tests: all
list-suites: all
slowTest:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
cache: 'gradle'
- name: Prepare env
run: |
echo ${INTEGRATION_TESTS_SECRETS_ENV} | base64 -d > tests/config/secrets.env
- name: Build with Gradle
run: ./gradlew --no-daemon --continue slowTest
- uses: actions/upload-artifact@v4
if: always()
with:
name: slowTest-reports
path: '**/TEST-*.xml'
- name: Test Report
uses: dorny/test-reporter@v1
if: always() # run this step even if previous step failed
with:
name: Junit Tests # Name of the check run which will be created
path: '**/TEST-*.xml' # Path to test results
reporter: java-junit # Format
list-tests: all
list-suites: all
integrationTest:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
cache: 'gradle'
- name: Prepare env
run: |
echo ${INTEGRATION_TESTS_SECRETS_ENV} | base64 -d > tests/config/secrets.env
- name: Build with Gradle
run: ./gradlew --no-daemon --continue integrationTest
- uses: actions/upload-artifact@v4
if: always()
with:
name: integrationTest-reports
path: '**/TEST-*.xml'
- name: Test Report
uses: dorny/test-reporter@v1
if: always() # run this step even if previous step failed
with:
name: Junit Tests # Name of the check run which will be created
path: '**/TEST-*.xml' # Path to test results
reporter: java-junit # Format
list-tests: all
list-suites: all
testReport:
needs: [test, slowTest, integrationTest]
runs-on: ubuntu-latest
if: false
steps:
# - uses: actions/checkout@v4
- name: Download artifacts
uses: actions/download-artifact@v4
- name: Publish Test Report
uses: mikepenz/action-junit-report@v4
if: always() # always run even if the previous step fails
with:
report_paths: '**/TEST-*.xml'
# #- "*/*/*/*/TEST-*.xml"
# #- "*/*/*/*/*/TEST-*.xml"
- name: Test Report
uses: dorny/test-reporter@v1
if: success() || failure() # run this step even if previous step failed
with:
name: Junit Tests # Name of the check run which will be created
path: '**/TEST-*.xml' # Path to test results
reporter: java-junit # Format
list-tests: all
list-suites: all
publishSnapshot:
if: ${{ github.ref == 'refs/heads/githubtest' }}
needs: [test, slowTest, integrationTest]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
cache: 'gradle'
- name: Publish release package
run: ./gradlew publish -x test -x slowTest -x integrationTest -Pinclude.documentation -PpublishToGithub -Pversion=$(cat VERSION)-SNAPSHOT
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
publishVersion:
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
needs: [test, slowTest, integrationTest]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
cache: 'gradle'
- name: Publish snapshot package
run: ./gradlew publish -x test -x slowTest -x integrationTest -Pinclude.documentation -PpublishToGithub -Pversion=$(cat VERSION)
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}