smoke.yml 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. name: Deploy Smoke Tests
  2. # Container smoke test for the unattended (cloud-init) install path.
  3. # Runs when the install/deploy assets change on a branch push or PR, and
  4. # again after a release-tag build finishes uploading its assets — passing the
  5. # tag as an explicit version, so the green result verifies the release
  6. # actually being shipped. That job deliberately runs the script from the
  7. # default branch rather than checking out the tag: workflow_run executes in
  8. # main's cache scope, so executing checked-out code there is a cache-poisoning
  9. # surface (CodeQL actions/cache-poisoning/poisonable-step), and users pipe
  10. # main's install.sh anyway.
  11. # Tag pushes must NOT trigger the unpinned job directly: at that moment
  12. # releases/latest still points at the previous release (#5756), and a `paths`
  13. # filter alone cannot exclude them because a brand-new tag ref has no diff
  14. # base, so it runs on every tag push.
  15. on:
  16. push:
  17. branches:
  18. - "**"
  19. paths:
  20. - "install.sh"
  21. - "deploy/**"
  22. - ".github/workflows/smoke.yml"
  23. pull_request:
  24. paths:
  25. - "install.sh"
  26. - "deploy/**"
  27. - ".github/workflows/smoke.yml"
  28. workflow_run:
  29. workflows: ["Release 3X-UI"]
  30. types: [completed]
  31. permissions:
  32. contents: read
  33. jobs:
  34. noninteractive-install:
  35. if: github.event_name != 'workflow_run'
  36. strategy:
  37. fail-fast: false
  38. matrix:
  39. runner: [ubuntu-latest, ubuntu-24.04-arm]
  40. runs-on: ${{ matrix.runner }}
  41. timeout-minutes: 15
  42. steps:
  43. - uses: actions/checkout@v7
  44. - name: Non-interactive install smoke test
  45. run: bash deploy/test/smoke-noninteractive.sh
  46. release-tag-install:
  47. if: >-
  48. github.event_name == 'workflow_run' &&
  49. github.event.workflow_run.conclusion == 'success' &&
  50. github.event.workflow_run.event == 'push' &&
  51. startsWith(github.event.workflow_run.head_branch, 'v') &&
  52. contains(github.event.workflow_run.head_branch, '.')
  53. strategy:
  54. fail-fast: false
  55. matrix:
  56. runner: [ubuntu-latest, ubuntu-24.04-arm]
  57. runs-on: ${{ matrix.runner }}
  58. timeout-minutes: 15
  59. steps:
  60. - uses: actions/checkout@v7
  61. - name: Pinned release install smoke test
  62. env:
  63. XUI_SMOKE_VERSION: ${{ github.event.workflow_run.head_branch }}
  64. run: bash deploy/test/smoke-noninteractive.sh "$XUI_SMOKE_VERSION"