1
0

ci.yml 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. name: CI
  2. on:
  3. schedule:
  4. # once per day
  5. - cron: 0 0 * * *
  6. push:
  7. branches:
  8. - dev
  9. - master
  10. pull_request:
  11. jobs:
  12. build-and-test:
  13. runs-on: ubuntu-latest
  14. steps:
  15. - uses: actions/checkout@v3
  16. - name: set up JDK 8
  17. uses: actions/setup-java@v3
  18. with:
  19. java-version: '8'
  20. distribution: 'adopt'
  21. - name: Cache Gradle dependencies
  22. uses: actions/cache@v3
  23. with:
  24. path: ~/.gradle/caches
  25. key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
  26. restore-keys: ${{ runner.os }}-gradle
  27. # See gradle file for difference between downloaders
  28. - name: Build and run Tests
  29. run: |
  30. if [[ $GITHUB_EVENT_NAME == 'schedule' ]]; then
  31. echo running with real downloader
  32. ./gradlew check --stacktrace -Ddownloader=REAL
  33. else
  34. echo running with mock downloader
  35. ./gradlew check --stacktrace -Ddownloader=MOCK
  36. fi
  37. - name: Upload test reports when failure occurs
  38. uses: actions/upload-artifact@v3
  39. if: failure()
  40. with:
  41. name: NewPipeExtractor-test-reports
  42. path: extractor/build/reports/tests/test/**