mirror of
https://github.com/mudler/LocalAI.git
synced 2026-11-06 12:33:16 -05:00
Many pushes to master left over a hundred runs queued, because every push used its own concurrency group. Group push runs by ref and cancel the in-flight run on master for the test, lint and E2E workflows. PR, tag, schedule and dispatch runs keep groups that a master push cannot cancel. The intel cache job pushes one fixed tag, so it now keeps at most one pending run per event and never cancels a running build. image.yml and backend.yml are unchanged: they build from the diff of a single push, so replacing a queued run could skip a code commit. Document the policy in .agents/ci-caching.md. Assisted-by: Claude:claude-sonnet-5-5 python3
50 lines
2.0 KiB
YAML
50 lines
2.0 KiB
YAML
# Concurrency policy: a newer push to master cancels the in-flight run of this
|
|
# workflow on master, because the newer commit contains the older one and the
|
|
# result that matters is the newest. PR runs group by PR number (as before),
|
|
# tag pushes group by their own tag ref, and schedule/dispatch runs group by
|
|
# commit SHA, so none of those is ever cancelled by a master push.
|
|
# See .agents/ci-caching.md, section "Concurrency".
|
|
---
|
|
# The packages under .github/ci/ are invisible to `go list ./...`, so neither
|
|
# `make lint` nor the repository test run ever touches them. Their specs are
|
|
# dead weight until a workflow names each package explicitly.
|
|
name: 'CI tool tests'
|
|
on:
|
|
pull_request:
|
|
paths:
|
|
- '.github/ci/**'
|
|
- '.github/workflows/ci-tools-tests.yaml'
|
|
push:
|
|
branches:
|
|
- master
|
|
paths:
|
|
- '.github/ci/**'
|
|
concurrency:
|
|
group: ci-tools-tests-${{ github.event.pull_request.number || (github.event_name == 'push' && github.ref) || github.sha }}-${{ github.repository }}
|
|
cancel-in-progress: ${{ github.event_name == 'pull_request' || (github.event_name == 'push' && github.ref == 'refs/heads/master') }}
|
|
|
|
jobs:
|
|
ci-tools:
|
|
name: 'Test the .github/ci generators'
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
- uses: actions/setup-go@v5
|
|
with:
|
|
go-version-file: go.mod
|
|
cache: false
|
|
|
|
# The discovery heuristics are the risky part of these tools. A regression
|
|
# produces confident, wrong gallery entries, which is worse than no tool.
|
|
- name: 'Test the APEX entry generator'
|
|
run: go test ./.github/ci/apexentries/
|
|
|
|
- name: 'Test the variant proposer'
|
|
run: go test ./.github/ci/variantproposals/
|
|
|
|
# Shared by both generators above. Its behaviour is exercised through their
|
|
# specs; this step exists so a break in the shared package fails under its
|
|
# own name rather than as a puzzling failure in whichever caller ran first.
|
|
- name: 'Test the shared gallery editor'
|
|
run: go test ./.github/ci/galleryedit/
|