mirror of
https://github.com/openobserve/openobserve.git
synced 2026-11-05 16:10:43 +00:00
Bumps [taiki-e/install-action](https://github.com/taiki-e/install-action) from 2 to 2.85.5. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/taiki-e/install-action/releases">taiki-e/install-action's releases</a>.</em></p> <blockquote> <h2>2.85.5</h2> <ul> <li> <p>Update <code>uv@latest</code> to 0.12.0.</p> </li> <li> <p>Update <code>syft@latest</code> to 1.50.0.</p> </li> <li> <p>Update <code>sccache@latest</code> to 0.17.0.</p> </li> <li> <p>Update <code>mise@latest</code> to 2026.7.16.</p> </li> </ul> <h2>2.85.4</h2> <ul> <li> <p>Update <code>uv@latest</code> to 0.11.33.</p> </li> <li> <p>Update <code>mise@latest</code> to 2026.7.15.</p> </li> <li> <p>Update <code>biome@latest</code> to 2.5.6.</p> </li> </ul> <h2>2.85.3</h2> <ul> <li> <p>Update <code>xh@latest</code> to 0.26.2.</p> </li> <li> <p>Update <code>ubi@latest</code> to 0.10.0.</p> </li> <li> <p>Update <code>mise@latest</code> to 2026.7.14.</p> </li> <li> <p>Update <code>martin@latest</code> to 1.13.0.</p> </li> <li> <p>Update <code>cargo-shear@latest</code> to 1.13.3.</p> </li> <li> <p>Update <code>cargo-binstall@latest</code> to 1.21.1.</p> </li> </ul> <h2>2.85.2</h2> <ul> <li> <p>Update <code>prek@latest</code> to 0.4.11.</p> </li> <li> <p>Update <code>mise@latest</code> to 2026.7.13.</p> </li> <li> <p>Update <code>kingfisher@latest</code> to 1.109.0.</p> </li> </ul> <h2>2.85.1</h2> <ul> <li> <p>Update <code>vacuum@latest</code> to 0.30.0.</p> </li> <li> <p>Update <code>uv@latest</code> to 0.11.32.</p> </li> <li> <p>Update <code>mise@latest</code> to 2026.7.12.</p> </li> <li> <p>Update <code>cyclonedx@latest</code> to 0.33.1.</p> </li> <li> <p>Update <code>cargo-neat@latest</code> to 0.5.2.</p> </li> </ul> <h2>2.85.0</h2> <ul> <li>Support <code>wild</code> (alias: <code>wild-linker</code>). (<a href="https://redirect.github.com/taiki-e/install-action/pull/1949">#1949</a>)</li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/taiki-e/install-action/blob/main/CHANGELOG.md">taiki-e/install-action's changelog</a>.</em></p> <blockquote> <h2>[2.85.7] - 2026-08-02</h2> <ul> <li> <p>Update <code>wasmtime@latest</code> to 47.0.3.</p> </li> <li> <p>Update <code>uv@latest</code> to 0.12.1.</p> </li> <li> <p>Update <code>rclone@latest</code> to 1.75.0.</p> </li> <li> <p>Update <code>kingfisher@latest</code> to 1.110.0.</p> </li> </ul> <h2>[2.85.6] - 2026-08-01</h2> <ul> <li> <p>Update <code>wasm-tools@latest</code> to 1.255.0.</p> </li> <li> <p>Update <code>tombi@latest</code> to 1.2.5.</p> </li> <li> <p>Update <code>mise@latest</code> to 2026.7.18.</p> </li> <li> <p>Update <code>cargo-neat@latest</code> to 0.5.3.</p> </li> <li> <p>Update <code>cargo-crap@latest</code> to 0.4.0.</p> </li> </ul> <h2>[2.85.5] - 2026-07-30</h2> <ul> <li> <p>Update <code>uv@latest</code> to 0.12.0.</p> </li> <li> <p>Update <code>syft@latest</code> to 1.50.0.</p> </li> <li> <p>Update <code>sccache@latest</code> to 0.17.0.</p> </li> <li> <p>Update <code>mise@latest</code> to 2026.7.16.</p> </li> </ul> <h2>[2.85.4] - 2026-07-29</h2> <ul> <li> <p>Update <code>uv@latest</code> to 0.11.33.</p> </li> <li> <p>Update <code>mise@latest</code> to 2026.7.15.</p> </li> <li> <p>Update <code>biome@latest</code> to 2.5.6.</p> </li> </ul> <h2>[2.85.3] - 2026-07-28</h2> <ul> <li> <p>Update <code>xh@latest</code> to 0.26.2.</p> </li> <li> <p>Update <code>ubi@latest</code> to 0.10.0.</p> </li> <li> <p>Update <code>mise@latest</code> to 2026.7.14.</p> </li> <li> <p>Update <code>martin@latest</code> to 1.13.0.</p> </li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/taiki-e/install-action/commit/87ddca437422cbc964934ac7b2d8423c1838090a"><code>87ddca4</code></a> Update <code>biome@latest</code> to 2.5.6</li> <li><a href="https://github.com/taiki-e/install-action/commit/18b1216eba7f8039b0f8d131d5473787f0edce68"><code>18b1216</code></a> Release 2.85.3</li> <li><a href="https://github.com/taiki-e/install-action/commit/3a7eb9d7de04335647f871d88d8831485be842be"><code>3a7eb9d</code></a> Update <code>xh@latest</code> to 0.26.2</li> <li><a href="https://github.com/taiki-e/install-action/commit/3d4a0c1c709bc0f907c2a23b1a17cf6296b08298"><code>3d4a0c1</code></a> Update uv manifest</li> <li><a href="https://github.com/taiki-e/install-action/commit/9e4a53cd83bbbd84b17bc14008d4b067b9e99edb"><code>9e4a53c</code></a> Update <code>ubi@latest</code> to 0.10.0</li> <li><a href="https://github.com/taiki-e/install-action/commit/9f2f6a3c937466e1abfae58f471a04b8835bc6de"><code>9f2f6a3</code></a> Update <code>mise@latest</code> to 2026.7.14</li> <li><a href="https://github.com/taiki-e/install-action/commit/e026bd26eeb6a9542c62d43e1f98ced8d56ac346"><code>e026bd2</code></a> Update <code>martin@latest</code> to 1.13.0</li> <li><a href="https://github.com/taiki-e/install-action/commit/f72efa0e99d8d9c15bf7fa6f14f0d4eb369fd084"><code>f72efa0</code></a> Update <code>cargo-shear@latest</code> to 1.13.3</li> <li><a href="https://github.com/taiki-e/install-action/commit/d19664f75e59dd9c49e306b357f78fcb72cd2711"><code>d19664f</code></a> Update <code>cargo-binstall@latest</code> to 1.21.1</li> <li><a href="https://github.com/taiki-e/install-action/commit/4d9bbfb56af57e022493493eecb97d07bf4fddd5"><code>4d9bbfb</code></a> Update biome manifest</li> <li>Additional commits viewable in <a href="https://github.com/taiki-e/install-action/compare/v2...v2.85.5">compare view</a></li> </ul> </details> <br /> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Hengfei Yang <hengfei.yang@gmail.com>
325 lines
9.3 KiB
YAML
325 lines
9.3 KiB
YAML
name: Unit tests
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- "main"
|
|
pull_request:
|
|
branches:
|
|
- "**"
|
|
merge_group:
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.event.merge_group.head_ref || github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
env:
|
|
COLUMNS: 150
|
|
ZO_RESULT_CACHE_ENABLED: true
|
|
|
|
jobs:
|
|
check_changes:
|
|
name: check_changes
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
outputs:
|
|
has_backend_changes: ${{ steps.check.outputs.has_backend_changes }}
|
|
has_ui_changes: ${{ steps.check.outputs.has_ui_changes }}
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- id: check
|
|
run: |
|
|
CHANGED=$(git diff --name-only origin/${{ github.base_ref || 'main' }} ${{ github.sha }})
|
|
if [ -z "$CHANGED" ] || echo "$CHANGED" | grep -qE '^src/|^proto/|^\.cargo/|^Cargo\.(toml|lock)$|^build\.rs$|^rust-toolchain\.toml$|^coverage\.sh$|^\.github/workflows/unit-tests\.yml$'; then
|
|
echo "has_backend_changes=true" >> $GITHUB_OUTPUT
|
|
else
|
|
echo "has_backend_changes=false" >> $GITHUB_OUTPUT
|
|
fi
|
|
if [ -z "$CHANGED" ] || echo "$CHANGED" | grep -q '^web/'; then
|
|
echo "has_ui_changes=true" >> $GITHUB_OUTPUT
|
|
else
|
|
echo "has_ui_changes=false" >> $GITHUB_OUTPUT
|
|
fi
|
|
|
|
backend_static_checks:
|
|
needs: [check_changes]
|
|
if: needs.check_changes.outputs.has_backend_changes == 'true'
|
|
runs-on:
|
|
labels: ubicloud-standard-8
|
|
permissions:
|
|
contents: read
|
|
steps:
|
|
- name: Clone the current repo
|
|
uses: actions/checkout@v5
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Setup Rust Toolchain
|
|
uses: dtolnay/rust-toolchain@master
|
|
with:
|
|
toolchain: nightly-2026-05-20
|
|
targets: x86_64-unknown-linux-gnu
|
|
|
|
- uses: Swatinem/rust-cache@v2
|
|
with:
|
|
cache-on-failure: true
|
|
shared-key: unit-tests
|
|
save-if: false
|
|
|
|
- name: Install Protoc
|
|
run: bash ./.github/protoc.sh
|
|
|
|
- name: Simulate building frontend code
|
|
run: mkdir -p web/dist && touch web/dist/index.html
|
|
|
|
- name: Print rustc cfg
|
|
run: rustc -C target-cpu=native --print cfg
|
|
|
|
- name: Check code formatting
|
|
run: cargo fmt --all -- --check
|
|
|
|
- name: Run clippy
|
|
run: cargo --config net.git-fetch-with-cli=true clippy --workspace --all-targets -- -D warnings
|
|
|
|
backend_unit_tests_postgres:
|
|
needs: [check_changes]
|
|
if: needs.check_changes.outputs.has_backend_changes == 'true'
|
|
runs-on:
|
|
labels: ubicloud-standard-8
|
|
permissions:
|
|
contents: read
|
|
env:
|
|
ZO_INTERNAL_GRPC_TOKEN: fake
|
|
ZO_TEXT_DATA_TYPE: text
|
|
ZO_META_STORE: postgres
|
|
ZO_META_POSTGRES_DSN: postgres://postgres:password@localhost:5432/postgres
|
|
services:
|
|
postgres:
|
|
image: postgres:17.5-alpine3.22
|
|
env:
|
|
POSTGRES_PASSWORD: password
|
|
POSTGRES_USER: postgres
|
|
POSTGRES_DB: postgres
|
|
ports:
|
|
- 5432:5432
|
|
options: --health-cmd "pg_isready -U postgres" --health-interval 10s --health-timeout 5s --health-retries 10
|
|
steps:
|
|
- name: Clone the current repo
|
|
uses: actions/checkout@v5
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Setup Rust Toolchain
|
|
uses: dtolnay/rust-toolchain@master
|
|
with:
|
|
toolchain: nightly-2026-05-20
|
|
targets: x86_64-unknown-linux-gnu
|
|
|
|
- uses: taiki-e/install-action@v2.85.5
|
|
with:
|
|
tool: nextest,cargo-llvm-cov
|
|
|
|
- uses: Swatinem/rust-cache@v2
|
|
with:
|
|
cache-on-failure: true
|
|
shared-key: unit-tests
|
|
save-if: ${{ github.ref == 'refs/heads/main' }}
|
|
|
|
- name: Install Protoc
|
|
run: bash ./.github/protoc.sh
|
|
|
|
- name: Simulate building frontend code
|
|
run: mkdir -p web/dist && touch web/dist/index.html
|
|
|
|
- name: Wait for PostgreSQL to be ready
|
|
run: |
|
|
echo "Waiting for PostgreSQL to be fully ready..."
|
|
for i in {1..30}; do
|
|
if PGPASSWORD=password psql -h localhost -U postgres -d postgres -c "SELECT 1" > /dev/null 2>&1; then
|
|
echo "PostgreSQL is ready!"
|
|
break
|
|
fi
|
|
echo "Waiting for PostgreSQL... attempt $i/30"
|
|
sleep 2
|
|
done
|
|
|
|
- name: Run PostgreSQL unit tests
|
|
run: ./coverage.sh run-cov
|
|
env:
|
|
ZO_DATA_DIR: ${{ runner.temp }}/openobserve-postgres/
|
|
|
|
- name: Check PostgreSQL coverage
|
|
run: ./coverage.sh check
|
|
|
|
backend_unit_tests_sqlite:
|
|
needs: [check_changes]
|
|
if: needs.check_changes.outputs.has_backend_changes == 'true'
|
|
runs-on:
|
|
labels: ubicloud-standard-8
|
|
permissions:
|
|
contents: read
|
|
env:
|
|
ZO_INTERNAL_GRPC_TOKEN: fake
|
|
ZO_TEXT_DATA_TYPE: text
|
|
ZO_META_STORE: sqlite
|
|
ZO_META_POSTGRES_DSN: ""
|
|
steps:
|
|
- name: Clone the current repo
|
|
uses: actions/checkout@v5
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Setup Rust Toolchain
|
|
uses: dtolnay/rust-toolchain@master
|
|
with:
|
|
toolchain: nightly-2026-05-20
|
|
targets: x86_64-unknown-linux-gnu
|
|
|
|
- uses: taiki-e/install-action@v2.85.5
|
|
with:
|
|
tool: nextest,cargo-llvm-cov
|
|
|
|
- uses: Swatinem/rust-cache@v2
|
|
with:
|
|
cache-on-failure: true
|
|
shared-key: unit-tests
|
|
save-if: false
|
|
|
|
- name: Install Protoc
|
|
run: bash ./.github/protoc.sh
|
|
|
|
- name: Simulate building frontend code
|
|
run: mkdir -p web/dist && touch web/dist/index.html
|
|
|
|
- name: Run SQLite unit tests
|
|
run: ./coverage.sh run-cov
|
|
env:
|
|
ZO_DATA_DIR: ${{ runner.temp }}/openobserve-sqlite/
|
|
|
|
- name: Check SQLite coverage
|
|
run: ./coverage.sh check
|
|
|
|
backend_unit_tests:
|
|
name: backend_unit_tests
|
|
runs-on: ubuntu-latest
|
|
permissions: {}
|
|
needs:
|
|
- check_changes
|
|
- backend_static_checks
|
|
- backend_unit_tests_postgres
|
|
- backend_unit_tests_sqlite
|
|
if: always() && needs.check_changes.outputs.has_backend_changes == 'true'
|
|
steps:
|
|
- name: Check backend test results
|
|
run: |
|
|
for result in \
|
|
"${{ needs.backend_static_checks.result }}" \
|
|
"${{ needs.backend_unit_tests_postgres.result }}" \
|
|
"${{ needs.backend_unit_tests_sqlite.result }}"; do
|
|
if [ "$result" != "success" ]; then
|
|
echo "A backend check failed or was skipped: $result"
|
|
exit 1
|
|
fi
|
|
done
|
|
echo "All backend checks completed successfully"
|
|
|
|
ui_unit_tests:
|
|
needs: [check_changes]
|
|
if: needs.check_changes.outputs.has_ui_changes == 'true'
|
|
runs-on:
|
|
labels: ubicloud-standard-8
|
|
permissions:
|
|
contents: read
|
|
|
|
steps:
|
|
- name: Clone the current repo
|
|
uses: actions/checkout@v5
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v7
|
|
with:
|
|
node-version: 24
|
|
cache: 'npm'
|
|
cache-dependency-path: web/package-lock.json
|
|
|
|
- name: Install dependencies
|
|
working-directory: web
|
|
run: npm ci
|
|
|
|
- name: Run frontend unit tests with coverage and check thresholds
|
|
working-directory: web
|
|
run: ./coverage.sh check
|
|
|
|
ui_code_quality:
|
|
needs: [check_changes]
|
|
if: needs.check_changes.outputs.has_ui_changes == 'true'
|
|
runs-on:
|
|
labels: ubicloud-standard-8
|
|
permissions:
|
|
contents: read
|
|
|
|
steps:
|
|
- name: Clone the current repo
|
|
uses: actions/checkout@v5
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v5
|
|
with:
|
|
node-version: 24
|
|
cache: 'npm'
|
|
cache-dependency-path: web/package-lock.json
|
|
|
|
- name: Install dependencies
|
|
working-directory: web
|
|
run: npm ci
|
|
|
|
- name: Prettier format check (any unformatted file fails)
|
|
working-directory: web
|
|
run: npm run format:check
|
|
|
|
- name: Type-check (any error fails)
|
|
working-directory: web
|
|
run: npm run type-check:app
|
|
|
|
unit_tests_summary:
|
|
runs-on: ubuntu-latest
|
|
permissions: {}
|
|
needs: [check_changes, backend_unit_tests, ui_unit_tests, ui_code_quality]
|
|
if: always()
|
|
steps:
|
|
- name: Check test results
|
|
run: |
|
|
if [ "${{ needs.check_changes.result }}" != "success" ]; then
|
|
echo "check_changes job did not succeed: ${{ needs.check_changes.result }}"
|
|
exit 1
|
|
fi
|
|
|
|
if [ "${{ needs.backend_unit_tests.result }}" == "success" ] || [ "${{ needs.backend_unit_tests.result }}" == "skipped" ]; then
|
|
echo "Backend tests passed or skipped"
|
|
else
|
|
echo "Backend tests failed"
|
|
exit 1
|
|
fi
|
|
|
|
if [ "${{ needs.ui_unit_tests.result }}" == "success" ] || [ "${{ needs.ui_unit_tests.result }}" == "skipped" ]; then
|
|
echo "UI tests passed or skipped"
|
|
else
|
|
echo "UI tests failed"
|
|
exit 1
|
|
fi
|
|
|
|
if [ "${{ needs.ui_code_quality.result }}" == "success" ] || [ "${{ needs.ui_code_quality.result }}" == "skipped" ]; then
|
|
echo "UI code quality passed or skipped"
|
|
else
|
|
echo "UI code quality failed"
|
|
exit 1
|
|
fi
|
|
|
|
echo "All tests completed successfully"
|