nightly-benchmark-overhead.yml 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. name: Nightly overhead benchmark
  2. on:
  3. schedule:
  4. # 5am GMT
  5. - cron: '0 5 * * *'
  6. workflow_dispatch:
  7. jobs:
  8. run-overhead-tests:
  9. runs-on: ubuntu-latest
  10. steps:
  11. - name: checkout
  12. uses: actions/checkout@v2.3.4
  13. - name: checkout
  14. uses: actions/checkout@v2.3.4
  15. with:
  16. ref: gh-pages
  17. path: gh-pages
  18. - name: copy results from gh-pages branch
  19. run: |
  20. rsync -avv gh-pages/benchmark-overhead/results/ benchmark-overhead/results/
  21. - name: run tests
  22. working-directory: benchmark-overhead
  23. run: ./gradlew test
  24. - name: inspect the results dir
  25. working-directory: benchmark-overhead
  26. run: ls -lR results
  27. - name: copy results back to gh-pages branch
  28. run: rsync -avv benchmark-overhead/results/ gh-pages/benchmark-overhead/results/ && rm -rf benchmark-overhead/results
  29. - name: commit updated results
  30. uses: EndBug/add-and-commit@v7
  31. with:
  32. add: 'benchmark-overhead/results'
  33. cwd: './gh-pages'
  34. branch: 'gh-pages'
  35. message: 'update test result data'
  36. issue:
  37. name: Open issue on failure
  38. needs: run-overhead-tests
  39. runs-on: ubuntu-latest
  40. if: always()
  41. steps:
  42. # run this action to get workflow conclusion
  43. # You can get conclusion by env (env.WORKFLOW_CONCLUSION)
  44. - uses: technote-space/workflow-conclusion-action@v2.2
  45. - uses: actions/checkout@v2.3.4
  46. with:
  47. fetch-depth: 0
  48. - uses: JasonEtco/create-an-issue@v2.6
  49. if: env.WORKFLOW_CONCLUSION == 'failure' # notify only if failure
  50. env:
  51. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  52. with:
  53. filename: .github/templates/workflow-failed.md