Files
Jamie Pineandcapy-ai-staging[bot] 9ad30afc20 Run core_tests.yml on pull requests against sources (#3108)
* Fix fs-watcher lib tests on Linux: filter temp files by name, drain events until Remove

Co-authored-by: capy-ai-staging[bot] <305915985+capy-ai-staging[bot]@users.noreply.github.com>

* Run core_tests.yml on pull requests against sources

Two Blacksmith jobs, unit and integration, each with its own cargo cache.
xtask test-core gains --unit and --integration so the halves run in
parallel. The volume helper now reports a missing loop device as a skip
reason instead of failing at mkfs time.

Co-authored-by: capy-ai-staging[bot] <305915985+capy-ai-staging[bot]@users.noreply.github.com>

* Record core_tests.yml on pull requests in PROJECT_STATUS.md; drop the temporary branch trigger

Co-authored-by: capy-ai-staging[bot] <305915985+capy-ai-staging[bot]@users.noreply.github.com>

* Fail xtask test-core when the selection matches no suite

Co-authored-by: capy-ai-staging[bot] <305915985+capy-ai-staging[bot]@users.noreply.github.com>

---------

Co-authored-by: capy-ai-staging[bot] <305915985+capy-ai-staging[bot]@users.noreply.github.com>
2026-10-05 02:00:20 +00:00

74 lines
2.1 KiB
YAML

name: Core Tests
on:
push:
branches: ["sources"]
pull_request:
branches: ["sources"]
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: 0
CARGO_NET_RETRY: 10
RUST_BACKTRACE: short
RUSTUP_MAX_RETRIES: 10
SD_AUTH: disabled
# Cancel previous runs of the same workflow on the same branch.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
strategy:
fail-fast: false
matrix:
suite:
- name: unit
# sd-fs-watcher's lib tests exercise the Linux inotify handler and
# live outside the sd-core runner, so the unit job runs them too.
run: |
cargo run -p xtask -- test-core --unit --verbose
cargo test -p sd-fs-watcher --lib
- name: integration
run: cargo run -p xtask -- test-core --integration --verbose
name: Core Tests (${{ matrix.suite.name }}, ubuntu-24.04)
runs-on: blacksmith-4vcpu-ubuntu-2404
timeout-minutes: 90
permissions:
contents: read
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Rust
uses: ./.github/actions/setup-rust
with:
restore-cache: "false"
# Blacksmith serves actions/cache transparently, so the upstream action
# is the right one here. Each half keeps its own key: the two jobs build
# different test targets and would otherwise overwrite each other.
- name: Cache Rust dependencies
uses: Swatinem/rust-cache@v2
with:
shared-key: core-tests-${{ matrix.suite.name }}
- name: Install system dependencies
run: ./scripts/setup.sh
- name: Setup Bun
uses: oven-sh/setup-bun@v1
with:
bun-version: "1.3.4"
- name: Install TypeScript dependencies
run: bun install --frozen-lockfile
- name: Run tests
run: ${{ matrix.suite.run }}