fix: target available Gitea runners and portable document pagination tests
Linux CI / desktop (push) Canceled after 0s
Linux CI / core (push) Canceled after 1m1s
Linux CI / desktop (push) Canceled after 0s
Linux CI / core (push) Canceled after 1m1s
This commit is contained in:
1 parent
81846b3e98
commit
d45aac17b5
2 files changed
+23
-10
No files matched your search
+10
-9
@@ -1,13 +1,16 @@
|
|||||||
name: Core CI
|
name: Linux CI
|
||||||
on: [push, pull_request]
|
on: [push, pull_request]
|
||||||
|
# Gitea currently has Ubuntu runners only; native Windows/macOS are separate
|
||||||
|
# release gates. Cancel obsolete branch runs instead of accumulating work.
|
||||||
|
concurrency:
|
||||||
|
group: searchi-ci-${{ github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
env:
|
env:
|
||||||
SEARCHI_FORCE_CPU: "1"
|
SEARCHI_FORCE_CPU: "1"
|
||||||
jobs:
|
jobs:
|
||||||
core:
|
core:
|
||||||
strategy:
|
runs-on: ubuntu-latest
|
||||||
matrix:
|
timeout-minutes: 20
|
||||||
os: [windows-latest, ubuntu-latest, macos-latest]
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: dtolnay/rust-toolchain@stable
|
- uses: dtolnay/rust-toolchain@stable
|
||||||
@@ -17,10 +20,8 @@ jobs:
|
|||||||
- run: cargo clippy --workspace --all-targets -- -D warnings
|
- run: cargo clippy --workspace --all-targets -- -D warnings
|
||||||
- run: cargo test --workspace --locked
|
- run: cargo test --workspace --locked
|
||||||
desktop:
|
desktop:
|
||||||
strategy:
|
runs-on: ubuntu-latest
|
||||||
matrix:
|
timeout-minutes: 25
|
||||||
os: [windows-latest, ubuntu-latest, macos-latest]
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
working-directory: apps/desktop
|
working-directory: apps/desktop
|
||||||
|
|||||||
@@ -145,9 +145,21 @@ fn real_pdf_and_docx_return_matching_locations_and_persist() -> Result<()> {
|
|||||||
assert_eq!(batch.len(), 2);
|
assert_eq!(batch.len(), 2);
|
||||||
let remainder = index.passage_batch(batch[1].id, 256)?;
|
let remainder = index.passage_batch(batch[1].id, 256)?;
|
||||||
assert_eq!(remainder.len(), 2);
|
assert_eq!(remainder.len(), 2);
|
||||||
assert!(remainder
|
// Directory traversal order differs by OS/filesystem. Pagination must
|
||||||
|
// preserve every passage exactly once, regardless of which file was first.
|
||||||
|
assert!(batch
|
||||||
|
.iter()
|
||||||
|
.all(|first| remainder.iter().all(|next| first.id != next.id)));
|
||||||
|
let all = batch.iter().chain(&remainder).collect::<Vec<_>>();
|
||||||
|
assert!(all
|
||||||
.iter()
|
.iter()
|
||||||
.any(|passage| passage.source.kind == "paragraph" && passage.source.number == 3));
|
.any(|passage| passage.source.kind == "paragraph" && passage.source.number == 3));
|
||||||
|
assert!(all
|
||||||
|
.iter()
|
||||||
|
.any(|passage| passage.source.kind == "page" && passage.source.number == 2));
|
||||||
|
assert!(index
|
||||||
|
.passage_batch(remainder.last().unwrap().id, 256)?
|
||||||
|
.is_empty());
|
||||||
assert!(index.contains_path(&result[0].path)?);
|
assert!(index.contains_path(&result[0].path)?);
|
||||||
assert!(!index.contains_path("unknown")?);
|
assert!(!index.contains_path("unknown")?);
|
||||||
drop(index);
|
drop(index);
|
||||||
|
|||||||
Reference in new issue
Block a user