mirror of
https://github.com/mudler/LocalAI.git
synced 2026-11-04 03:24:43 -05:00
* ci: select affected checks and share add-on builds Keep validation check identities present while omitting expensive steps when explicit dependency rules prove they are unaffected. Unknown inputs and diff failures retain broad validation. Select add-on package legs on PRs and master without weakening catalog checks or changing release publishing. Manual package runs validate only, including their reusable Sandbox guest image dependency. Share bounded, same-run production fixtures across the five add-on test groups. Verify checkout identity, tools, paths, modes and checksums before using them. Keep instrumented coverage builds separate. Assisted-by: nib:gpt-6.1-sol Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * fix(ci): validate documentation test contracts Documentation is executable input to Tables, recovery, diagnostics, gallery and other add-on tests. Select all domains for docs changes instead of treating the whole directory as inert. Cover known readers, unfamiliar paths and deleted guides in classifier regression fixtures. Assisted-by: nib:gpt-6.1-sol Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * fix(ci): gate affected jobs before allocation Classify each workflow once and gate whole expensive jobs. Limit add-on matrices to affected packages and host groups instead of allocating all runners before deciding whether their steps should run. Select documentation readers explicitly and derive host consumers from local Go imports. Keep unknown source inputs conservative. Preserve coverage, production fixtures, publish locks and manual full validation. Remove the unrequested weekly schedules. Reject classifier failures and unexpected dependency skips in stable aggregate checks. Document required-check migration without claiming access to protected-branch settings. Test actual YAML job and matrix eligibility against representative paths and the original triggers. Assisted-by: nib:gpt-6.1-sol Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * fix(ci): validate executable and fixture seams Include executed fixture binaries and their production imports in host selection. Lexical Go imports alone miss the mock backend started by the UI test server and add-on suites. Rebase restored artifact timestamps only after identity and checksum validation. Preserve the existing stale-source checks across a later consumer checkout and reject subsequent source edits. Validate package plan outputs before allowing dependency skips. Missing or malformed plans must not turn failed publication preparation green. Cover all three review findings with before-fix reproductions and actual workflow eligibility regressions. Assisted-by: nib:gpt-6.1-sol Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * fix(ci): use native workflow path filters Replace calculated dependencies with visible PR and master path lists. Run complete area suites without classifier runners or result plumbing. Restore original packaging validation and publication dependencies. Keep one production fixture build for the five original add-on groups. Verify artifact identity and freshness without changing suite inventories. Document allowlist maintenance and required-check migration limits. Assisted-by: nib:gpt-6.1-sol Signed-off-by: Ettore Di Giacinto <mudler@localai.io> --------- Signed-off-by: Ettore Di Giacinto <mudler@localai.io> Co-authored-by: Ettore Di Giacinto <mudler@localai.io>
106 lines
3.2 KiB
YAML
106 lines
3.2 KiB
YAML
---
|
|
name: 'E2E Backend Tests'
|
|
|
|
on:
|
|
pull_request:
|
|
paths:
|
|
- 'core/**'
|
|
- 'pkg/**'
|
|
- 'cmd/**'
|
|
- 'internal/**'
|
|
- 'backend/go/**'
|
|
- 'backend/*.proto'
|
|
- 'backend/*/*.proto'
|
|
- 'addons/**'
|
|
- 'tests/**'
|
|
- 'configuration/**'
|
|
- 'swagger/**'
|
|
- 'prompt-templates/**'
|
|
- 'go.mod'
|
|
- 'go.sum'
|
|
- 'Makefile'
|
|
- 'scripts/**'
|
|
- '.github/actions/**'
|
|
- '.github/workflows/tests-e2e.yml'
|
|
push:
|
|
branches: [master]
|
|
tags: ['*']
|
|
paths:
|
|
- 'core/**'
|
|
- 'pkg/**'
|
|
- 'cmd/**'
|
|
- 'internal/**'
|
|
- 'backend/go/**'
|
|
- 'backend/*.proto'
|
|
- 'backend/*/*.proto'
|
|
- 'addons/**'
|
|
- 'tests/**'
|
|
- 'configuration/**'
|
|
- 'swagger/**'
|
|
- 'prompt-templates/**'
|
|
- 'go.mod'
|
|
- 'go.sum'
|
|
- 'Makefile'
|
|
- 'scripts/**'
|
|
- '.github/actions/**'
|
|
- '.github/workflows/tests-e2e.yml'
|
|
|
|
concurrency:
|
|
group: ci-tests-e2e-backend-${{ github.event.pull_request.number || github.sha }}-${{ github.repository }}
|
|
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
|
|
jobs:
|
|
tests-e2e-backend:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
go-version: ['1.25.x']
|
|
steps:
|
|
- name: Clone
|
|
uses: actions/checkout@v7
|
|
with:
|
|
submodules: true
|
|
- name: Configure apt mirror on runner
|
|
uses: ./.github/actions/configure-apt-mirror
|
|
- name: Setup Go ${{ matrix.go-version }}
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version: ${{ matrix.go-version }}
|
|
cache: false
|
|
- name: Display Go version
|
|
run: go version
|
|
- name: Proto Dependencies
|
|
run: |
|
|
# Install protoc
|
|
curl -L -s https://github.com/protocolbuffers/protobuf/releases/download/v26.1/protoc-26.1-linux-x86_64.zip -o protoc.zip && \
|
|
unzip -j -d /usr/local/bin protoc.zip bin/protoc && \
|
|
rm protoc.zip
|
|
go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.34.2
|
|
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@1958fcbe2ca8bd93af633f11e97d44e567e945af
|
|
PATH="$PATH:$HOME/go/bin" make protogen-go
|
|
- name: Dependencies
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y build-essential libopus-dev
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v7
|
|
with:
|
|
node-version: '22'
|
|
- name: Build React UI
|
|
run: make react-ui
|
|
- name: Test Backend E2E
|
|
run: |
|
|
PATH="$PATH:$HOME/go/bin" make build-mock-backend test-e2e
|
|
# tmate keeps the runner busy until the 6 hour job limit, so a single
|
|
# failure costs a whole runner slot. Only open a session when someone
|
|
# asked for one by labelling the pull request `ci-debug`, and cap the
|
|
# session so a forgotten label cannot idle a runner either.
|
|
- name: Setup tmate session if tests fail
|
|
if: ${{ failure() && contains(github.event.pull_request.labels.*.name, 'ci-debug') }}
|
|
timeout-minutes: 30
|
|
uses: mxschmitt/action-tmate@v3.23
|
|
with:
|
|
detached: true
|
|
connect-timeout-seconds: 180
|
|
limit-access-to-actor: true
|