108 lines
3.2 KiB
YAML
108 lines
3.2 KiB
YAML
name: Nightly build
|
|
|
|
on:
|
|
schedule:
|
|
# strange schedule to reduce the risk of DDOS GitHub infra
|
|
- cron: "24 3 * * *"
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
java: [8, 11, 14]
|
|
fail-fast: false
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Set up JDK ${{ matrix.java }} for running tests
|
|
uses: actions/setup-java@v1
|
|
with:
|
|
java-version: ${{ matrix.java }}
|
|
- name: Set JDK ${{ matrix.java }} home
|
|
run: echo "::set-env name=JAVA_${{ matrix.java }}_HOME::${{ env.JAVA_HOME }}"
|
|
|
|
- name: Set up JDK 11 for running Gradle
|
|
if: matrix.java != 11
|
|
uses: actions/setup-java@v1
|
|
with:
|
|
java-version: 11
|
|
|
|
- name: Cache gradle dependencies
|
|
uses: burrunan/gradle-cache-action@v1
|
|
with:
|
|
job-id: jdk${{ matrix.java }}
|
|
|
|
- name: Test with Gradle
|
|
uses: nick-invision/retry@v1
|
|
env:
|
|
S3_BUILD_CACHE_ACCESS_KEY_ID: ${{ secrets.S3_BUILD_CACHE_ACCESS_KEY_ID }}
|
|
S3_BUILD_CACHE_SECRET_KEY: ${{ secrets.S3_BUILD_CACHE_SECRET_KEY }}
|
|
with:
|
|
command: ./gradlew testJava${{ matrix.java }} --stacktrace
|
|
timeout_minutes: 60
|
|
max_attempts: 3
|
|
|
|
- name: Aggregate test reports with ciMate
|
|
if: always()
|
|
continue-on-error: true
|
|
env:
|
|
CIMATE_PROJECT_ID: mz1jo49x
|
|
CIMATE_CI_KEY: "Night / jdk${{matrix.java}}"
|
|
run: |
|
|
wget -q https://get.cimate.io/release/linux/cimate
|
|
chmod +x cimate
|
|
./cimate -v "**/TEST-*.xml"
|
|
|
|
testLatestDep:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Set up JDK 11
|
|
uses: actions/setup-java@v1
|
|
with:
|
|
java-version: 11
|
|
|
|
- name: Cache gradle dependencies
|
|
uses: burrunan/gradle-cache-action@v1
|
|
with:
|
|
job-id: latestDepTest
|
|
|
|
- name: Test with Gradle
|
|
uses: nick-invision/retry@v1
|
|
env:
|
|
S3_BUILD_CACHE_ACCESS_KEY_ID: ${{ secrets.S3_BUILD_CACHE_ACCESS_KEY_ID }}
|
|
S3_BUILD_CACHE_SECRET_KEY: ${{ secrets.S3_BUILD_CACHE_SECRET_KEY }}
|
|
with:
|
|
command: ./gradlew test -PtestLatestDeps=true --stacktrace
|
|
timeout_minutes: 60
|
|
max_attempts: 3
|
|
|
|
- name: Aggregate test reports with ciMate
|
|
if: always()
|
|
continue-on-error: true
|
|
env:
|
|
CIMATE_PROJECT_ID: mz1jo49x
|
|
CIMATE_CI_KEY: "Night / latestDep"
|
|
run: |
|
|
wget -q https://get.cimate.io/release/linux/cimate
|
|
chmod +x cimate
|
|
./cimate -v "**/TEST-*.xml"
|
|
|
|
issue:
|
|
name: Open issue on failure
|
|
needs: [test, testLatestDep]
|
|
runs-on: ubuntu-latest
|
|
if: always()
|
|
steps:
|
|
# run this action to get workflow conclusion
|
|
# You can get conclusion by env (env.WORKFLOW_CONCLUSION)
|
|
- uses: technote-space/workflow-conclusion-action@v1
|
|
- uses: actions/checkout@v2
|
|
- uses: JasonEtco/create-an-issue@v2
|
|
if: env.WORKFLOW_CONCLUSION == 'failure' # notify only if failure
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
filename: .github/workflows/nightly-failed.md
|