twisted_trunk.yml 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. name: Twisted Trunk
  2. on:
  3. schedule:
  4. - cron: 0 8 * * *
  5. workflow_dispatch:
  6. jobs:
  7. mypy:
  8. runs-on: ubuntu-latest
  9. steps:
  10. - uses: actions/checkout@v2
  11. - uses: actions/setup-python@v2
  12. - run: .ci/patch_for_twisted_trunk.sh
  13. - run: pip install tox
  14. - run: tox -e mypy
  15. trial:
  16. runs-on: ubuntu-latest
  17. steps:
  18. - uses: actions/checkout@v2
  19. - run: sudo apt-get -qq install xmlsec1
  20. - uses: actions/setup-python@v2
  21. with:
  22. python-version: 3.7
  23. - run: .ci/patch_for_twisted_trunk.sh
  24. - run: pip install tox
  25. - run: tox -e py
  26. env:
  27. TRIAL_FLAGS: "--jobs=2"
  28. - name: Dump logs
  29. # Logs are most useful when the command fails, always include them.
  30. if: ${{ always() }}
  31. # Note: Dumps to workflow logs instead of using actions/upload-artifact
  32. # This keeps logs colocated with failing jobs
  33. # It also ignores find's exit code; this is a best effort affair
  34. run: >-
  35. find _trial_temp -name '*.log'
  36. -exec echo "::group::{}" \;
  37. -exec cat {} \;
  38. -exec echo "::endgroup::" \;
  39. || true
  40. sytest:
  41. runs-on: ubuntu-latest
  42. container:
  43. image: matrixdotorg/sytest-synapse:buster
  44. volumes:
  45. - ${{ github.workspace }}:/src
  46. steps:
  47. - uses: actions/checkout@v2
  48. - name: Patch dependencies
  49. run: .ci/patch_for_twisted_trunk.sh
  50. working-directory: /src
  51. - name: Run SyTest
  52. run: /bootstrap.sh synapse
  53. working-directory: /src
  54. - name: Summarise results.tap
  55. if: ${{ always() }}
  56. run: /sytest/scripts/tap_to_gha.pl /logs/results.tap
  57. - name: Upload SyTest logs
  58. uses: actions/upload-artifact@v2
  59. if: ${{ always() }}
  60. with:
  61. name: Sytest Logs - ${{ job.status }} - (${{ join(matrix.*, ', ') }})
  62. path: |
  63. /logs/results.tap
  64. /logs/**/*.log*
  65. # open an issue if the build fails, so we know about it.
  66. open-issue:
  67. if: failure()
  68. needs:
  69. - mypy
  70. - trial
  71. - sytest
  72. runs-on: ubuntu-latest
  73. steps:
  74. - uses: actions/checkout@v2
  75. - uses: JasonEtco/create-an-issue@5d9504915f79f9cc6d791934b8ef34f2353dd74d # v2.5.0, 2020-12-06
  76. env:
  77. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  78. with:
  79. update_existing: true
  80. filename: .ci/twisted_trunk_build_failed_issue_template.md