2020-12-27 15:15:41 +01:00
|
|
|
name: CI
|
|
|
|
|
|
|
|
on:
|
2021-01-15 20:34:04 +01:00
|
|
|
schedule:
|
|
|
|
# once per day
|
|
|
|
- cron: 0 0 * * *
|
2020-12-27 15:15:41 +01:00
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- dev
|
|
|
|
- master
|
|
|
|
pull_request:
|
|
|
|
|
2022-07-03 22:55:28 +02:00
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
|
2020-12-27 15:15:41 +01:00
|
|
|
jobs:
|
|
|
|
build-and-test:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-09-05 12:00:13 +02:00
|
|
|
- uses: actions/checkout@v4
|
2020-12-27 15:15:41 +01:00
|
|
|
|
2022-08-09 05:44:34 +02:00
|
|
|
- name: set up JDK 11
|
2023-12-29 11:57:47 +01:00
|
|
|
uses: actions/setup-java@v4
|
2020-12-27 15:15:41 +01:00
|
|
|
with:
|
2022-08-09 05:44:34 +02:00
|
|
|
java-version: '11'
|
2022-07-10 17:38:08 +02:00
|
|
|
distribution: 'temurin'
|
2020-12-27 15:15:41 +01:00
|
|
|
|
|
|
|
- name: Cache Gradle dependencies
|
2024-01-18 10:32:42 +01:00
|
|
|
uses: actions/cache@v4
|
2020-12-27 15:15:41 +01:00
|
|
|
with:
|
|
|
|
path: ~/.gradle/caches
|
|
|
|
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
|
|
|
|
restore-keys: ${{ runner.os }}-gradle
|
|
|
|
|
2021-01-15 20:34:04 +01:00
|
|
|
# See gradle file for difference between downloaders
|
2020-12-27 15:15:41 +01:00
|
|
|
- name: Build and run Tests
|
2021-01-15 20:34:04 +01:00
|
|
|
run: |
|
2023-04-26 18:36:25 +02:00
|
|
|
if [[ "$GITHUB_EVENT_NAME" == 'schedule' ]]; then
|
2021-01-17 19:52:28 +01:00
|
|
|
echo running with real downloader
|
2021-01-15 20:34:04 +01:00
|
|
|
./gradlew check --stacktrace -Ddownloader=REAL
|
|
|
|
else
|
2021-01-17 19:52:28 +01:00
|
|
|
echo running with mock downloader
|
2021-01-15 20:34:04 +01:00
|
|
|
./gradlew check --stacktrace -Ddownloader=MOCK
|
|
|
|
fi
|
2022-03-26 19:57:17 +01:00
|
|
|
|
|
|
|
- name: Upload test reports when failure occurs
|
2024-03-18 08:53:24 +01:00
|
|
|
uses: actions/upload-artifact@v4
|
2022-03-26 19:57:17 +01:00
|
|
|
if: failure()
|
|
|
|
with:
|
|
|
|
name: NewPipeExtractor-test-reports
|
|
|
|
path: extractor/build/reports/tests/test/**
|