mirror of
https://github.com/datahaven-xyz/datahaven
synced 2026-05-24 09:50:01 +00:00
ci: remove nextest archive (#164)
Removing the nextest archive steps from the CI because it is taking a lot of time to download. From latest ci runs downloading take 17min. --------- Co-authored-by: Ahmad Kaouk <56095276+ahmadkaouk@users.noreply.github.com>
This commit is contained in:
parent
f8b5706073
commit
60d0e2c901
1 changed files with 9 additions and 52 deletions
61
.github/workflows/task-rust-tests.yml
vendored
61
.github/workflows/task-rust-tests.yml
vendored
|
|
@ -1,9 +1,7 @@
|
|||
# Rust Tests: CI for Rust components (DataHaven runtime and node Rust tests)
|
||||
#
|
||||
# Overview:
|
||||
# 1. Prepare: This job handles the setup phase where the cargo nextest archive is created
|
||||
# and uploaded to the workflow for use in the subsequent jobs
|
||||
# 2. All Rust Tests: Executes the full suite of Rust tests across two partitions to
|
||||
# All Rust Tests: Executes the full suite of Rust tests across two partitions to
|
||||
# to reduce total execution time.
|
||||
|
||||
name: DataHaven Operator Rust Tests
|
||||
|
|
@ -13,15 +11,19 @@ on:
|
|||
workflow_call:
|
||||
|
||||
jobs:
|
||||
|
||||
prepare:
|
||||
name: Prepare artifacts for Rust tests
|
||||
all-rust-tests:
|
||||
name: Run all Operator Rust tests (/w partitioning)
|
||||
runs-on:
|
||||
group: DH-runners
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
partition: [1, 2]
|
||||
env:
|
||||
RUSTC_WRAPPER: "sccache"
|
||||
CARGO_INCREMENTAL: "0"
|
||||
CARGO_TERM_COLOR: always
|
||||
RUSTFLAGS: "-C linker=clang -C link-arg=-fuse-ld=mold"
|
||||
SCCACHE_GHA_ENABLED: "true"
|
||||
defaults:
|
||||
run:
|
||||
|
|
@ -29,17 +31,13 @@ jobs:
|
|||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
fetch-depth: 0
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
- uses: ./.github/workflows/actions/setup-env
|
||||
with:
|
||||
cache-key: "TEST"
|
||||
install-deps: false
|
||||
|
||||
- name: Set build flags
|
||||
run: echo "RUSTFLAGS=${{ env.RUSTFLAGS }} -C linker=clang -C link-arg=-fuse-ld=mold" >> $GITHUB_ENV
|
||||
|
||||
# Cleanup-runner skipped on self-hosted runners (bare-metal manages disk space externally)
|
||||
- name: Install nextest
|
||||
run: |
|
||||
if ! command -v cargo-nextest &> /dev/null; then
|
||||
|
|
@ -48,46 +46,9 @@ jobs:
|
|||
else
|
||||
echo "cargo-nextest is already installed: $(cargo-nextest --version)"
|
||||
fi
|
||||
- name: Build and archive tests
|
||||
run: cargo nextest archive --archive-file nextest-archive.tar.zst
|
||||
- name: Upload archive to workflow
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: nextest-archive
|
||||
path: ./operator/nextest-archive.tar.zst
|
||||
|
||||
all-rust-tests:
|
||||
name: Run all Operator Rust tests (/w partitioning)
|
||||
needs: [prepare]
|
||||
runs-on:
|
||||
group: DH-runners
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
partition: [1, 2]
|
||||
defaults:
|
||||
run:
|
||||
working-directory: ./operator
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
- name: Install nextest
|
||||
run: |
|
||||
if ! command -v cargo-nextest &> /dev/null; then
|
||||
echo "Installing cargo-nextest version 0.9.100"
|
||||
cargo install cargo-nextest --version 0.9.100 --locked
|
||||
else
|
||||
echo "cargo-nextest is already installed: $(cargo-nextest --version)"
|
||||
fi
|
||||
- name: Download archive
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: nextest-archive
|
||||
- name: Run Tests for All Projects!
|
||||
run: |
|
||||
~/.cargo/bin/cargo-nextest nextest run \
|
||||
--archive-file ../nextest-archive.tar.zst \
|
||||
--partition count:${{ matrix.partition }}/2
|
||||
|
||||
tests-result-checker:
|
||||
|
|
@ -96,10 +57,6 @@ jobs:
|
|||
runs-on:
|
||||
group: DH-runners
|
||||
steps:
|
||||
- name: Cleanup test artifacts
|
||||
uses: geekyeggo/delete-artifact@v5
|
||||
with:
|
||||
name: nextest-archive
|
||||
- name: Validate test results
|
||||
run: |
|
||||
echo "matrix result: ${{ needs.all-rust-tests.result }}"
|
||||
|
|
|
|||
Loading…
Reference in a new issue