ELK Nightly CI #982
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
# Runs ELK's build and tests every night. | |
# This is helpful to detect general build errors, | |
# since PRs are not blocked by unsuccesful 'ci.yml' builds | |
# and direct pushes to master are allowed. | |
name: ELK Nightly CI | |
on: | |
schedule: | |
- cron: '00 03 * * *' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
# We check LTS versions and the latest release | |
# 8 - LTS | |
# 11 - LTS | |
# 14 - latest | |
java-version: [ 8, 11, 14 ] | |
steps: | |
# Checkout the reposity of both elk and elk-models (the latter is required for the tests) | |
- uses: actions/checkout@v2 | |
with: | |
path: elk | |
- uses: actions/checkout@v2 | |
with: | |
repository: eclipse/elk-models | |
path: elk-models | |
# Prepare and use a cache for maven | |
- uses: actions/cache@v1 | |
with: | |
path: ~/.m2/repository | |
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | |
restore-keys: | | |
${{ runner.os }}-maven- | |
- name: Set up Java version ${{ matrix.java-version }} | |
uses: actions/setup-java@v1 | |
with: | |
java-version: ${{ matrix.java-version }} | |
- name: Build and verify with maven | |
# Run mvn in the 'build' folder | |
working-directory: /home/runner/work/elk/elk/elk/build/ | |
# As line breaks do not seem to be supported, env variables are used as workaround to make the mvn call readable | |
run: mvn $opts $doc $test $test_models clean verify | |
env: | |
opts: --fail-at-end --no-transfer-progress | |
doc: --define elk.metadata.documentation.outputPath=/home/runner/work/elk/elk/elk/docs | |
test: --define tests.paths.elk-repo=/home/runner/work/elk/elk/elk | |
test_models: --define tests.paths.models-repo=/home/runner/work/elk/elk/elk-models |