mirror of
https://github.com/open-webui/open-webui.git
synced 2026-11-15 18:55:07 +03:00
27b82831a4
While a release pull request is open, every commit to dev restarted the full test suite and cancelled the run that was in progress, so runs rarely finished and they kept taking runners from the builds here. The suite is now started by hand from the tests repo against the commit we want checked. A run started there is not cancelled by new commits, so it finishes, and nothing starts a new one on every commit.
46 lines
2.0 KiB
Plaintext
46 lines
2.0 KiB
Plaintext
# ─────────────────────────────────────────────────────────────────────────────
|
|
# Tests — run the open-webui/tests unit suite against a release candidate
|
|
# Release pull requests go from dev into main and are titled with the version
|
|
# ─────────────────────────────────────────────────────────────────────────────
|
|
name: Tests
|
|
|
|
on:
|
|
pull_request:
|
|
branches: [main, dev]
|
|
types: [opened, synchronize, reopened, edited]
|
|
|
|
# An edit must not cancel a running suite: the replacement run would skip it and still report green.
|
|
concurrency:
|
|
group: regression-${{ github.ref }}
|
|
cancel-in-progress: ${{ github.event.action != 'edited' }}
|
|
|
|
jobs:
|
|
# Into main only the release branch counts; into dev any version title does, so the
|
|
# suite can be exercised outside a release. Expressions have no regex, hence the literal prefixes.
|
|
regression:
|
|
name: Suite
|
|
if: >-
|
|
(github.event.pull_request.base.ref == 'dev' ||
|
|
github.event.pull_request.head.ref == 'dev') &&
|
|
(github.event.action != 'edited' || github.event.changes.title != null) &&
|
|
(startsWith(github.event.pull_request.title, '0.') ||
|
|
startsWith(github.event.pull_request.title, '1.'))
|
|
permissions:
|
|
contents: read
|
|
uses: open-webui/tests/.github/workflows/regression.yml@main
|
|
with:
|
|
open-webui-ref: ${{ github.event.pull_request.head.sha }}
|
|
|
|
# Single check to require in branch protection.
|
|
result:
|
|
name: Result
|
|
needs: [regression]
|
|
if: always()
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 5
|
|
permissions: {}
|
|
steps:
|
|
- name: Fail unless the suite passed or was not required
|
|
if: needs.regression.result != 'success' && needs.regression.result != 'skipped'
|
|
run: exit 1
|