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>
126 lines
4.3 KiB
YAML
126 lines
4.3 KiB
YAML
---
|
|
name: 'Distributed E2E Tests'
|
|
|
|
# The distributed architecture against real PostgreSQL and NATS (including the
|
|
# NATS JWT specs), started by testcontainers, plus the multi-frontend paths
|
|
# against the in-process bus under the race detector. Nothing else runs the
|
|
# dedicated `make test-e2e-distributed` target: `make test-e2e` reaches these
|
|
# specs only because it recurses, and only after it has built the e2e image.
|
|
on:
|
|
pull_request:
|
|
paths:
|
|
- 'tests/e2e/distributed/**'
|
|
- 'Makefile'
|
|
- '.github/workflows/tests-e2e-distributed.yml'
|
|
- 'core/**'
|
|
- 'pkg/**'
|
|
- 'cmd/**'
|
|
- 'internal/**'
|
|
- 'backend/go/**'
|
|
- 'backend/*.proto'
|
|
- 'backend/*/*.proto'
|
|
- 'configuration/**'
|
|
- 'go.mod'
|
|
- 'go.sum'
|
|
- 'scripts/**'
|
|
- '.github/actions/**'
|
|
push:
|
|
branches: [master]
|
|
paths:
|
|
- 'tests/e2e/distributed/**'
|
|
- 'Makefile'
|
|
- '.github/workflows/tests-e2e-distributed.yml'
|
|
- 'core/**'
|
|
- 'pkg/**'
|
|
- 'cmd/**'
|
|
- 'internal/**'
|
|
- 'backend/go/**'
|
|
- 'backend/*.proto'
|
|
- 'backend/*/*.proto'
|
|
- 'configuration/**'
|
|
- 'go.mod'
|
|
- 'go.sum'
|
|
- 'scripts/**'
|
|
- '.github/actions/**'
|
|
schedule:
|
|
# Pre-existing nightly coverage of the distributed suites.
|
|
- cron: '17 3 * * *'
|
|
workflow_dispatch:
|
|
|
|
concurrency:
|
|
group: ci-tests-e2e-distributed-${{ github.event.pull_request.number || github.sha }}-${{ github.repository }}
|
|
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
fakebus:
|
|
# No containers: the in-process bus carries the messages between two
|
|
# frontends, a worker and the cluster state, with the race detector on.
|
|
name: multi-frontend over the in-process bus
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 30
|
|
steps:
|
|
- name: Clone
|
|
uses: actions/checkout@v7
|
|
with:
|
|
persist-credentials: false
|
|
- name: Setup Go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version: '1.26.x'
|
|
cache: false
|
|
- name: Proto Dependencies
|
|
run: |
|
|
curl -L -s https://github.com/protocolbuffers/protobuf/releases/download/v26.1/protoc-26.1-linux-x86_64.zip -o protoc.zip && \
|
|
sudo 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: System Dependencies
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y build-essential libopus-dev
|
|
- name: Stub the React UI for go:embed
|
|
# core/http embeds react-ui/dist. These tests do not serve the UI.
|
|
run: |
|
|
mkdir -p core/http/react-ui/dist
|
|
touch core/http/react-ui/dist/index.html
|
|
- name: Test the multi-frontend paths under the race detector
|
|
run: PATH="$PATH:$HOME/go/bin" make test-distributed-fakebus
|
|
|
|
distributed:
|
|
name: PostgreSQL and NATS in containers
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 60
|
|
steps:
|
|
- name: Clone
|
|
uses: actions/checkout@v7
|
|
with:
|
|
persist-credentials: false
|
|
- name: Setup Go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version: '1.26.x'
|
|
cache: false
|
|
- name: Proto Dependencies
|
|
run: |
|
|
curl -L -s https://github.com/protocolbuffers/protobuf/releases/download/v26.1/protoc-26.1-linux-x86_64.zip -o protoc.zip && \
|
|
sudo 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
|
|
- name: System Dependencies
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y build-essential libopus-dev
|
|
- name: Stub the React UI for go:embed
|
|
run: |
|
|
mkdir -p core/http/react-ui/dist
|
|
touch core/http/react-ui/dist/index.html
|
|
- name: Run the distributed e2e suite
|
|
# protogen-go is a prerequisite of the target.
|
|
run: PATH="$PATH:$HOME/go/bin" make test-e2e-distributed
|