-
Notifications
You must be signed in to change notification settings - Fork 103
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
156 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
name: HotShot integration tests | ||
|
||
on: | ||
push: | ||
branches: | ||
- "main" | ||
pull_request: | ||
schedule: | ||
- cron: "0 0 * * 1" | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ (github.ref == 'refs/heads/main' && github.run_number) || github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
test: | ||
strategy: | ||
matrix: | ||
test_suites: | ||
- test-ci-1 | ||
- test-ci-2 | ||
- test-ci-3 | ||
- test-ci-4 | ||
- test-ci-5 | ||
- test-ci-6-1 | ||
- test-ci-6-2 | ||
- test-ci-6-3 | ||
- test-ci-6-4 | ||
- test-ci-6-5 | ||
- test-ci-6-6 | ||
- test-ci-rest | ||
fail-fast: false | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
name: Checkout Repository | ||
|
||
- name: Install Rust | ||
uses: mkroening/rust-toolchain-toml@main | ||
|
||
- uses: Swatinem/rust-cache@v2 | ||
name: Enable Rust Caching | ||
with: | ||
shared-key: "hotshot-tests" | ||
cache-on-failure: "true" | ||
save-if: ${{ github.ref == 'refs/heads/main' && matrix.test_suites == 'test-ci-rest' }} | ||
|
||
- uses: taiki-e/install-action@just | ||
|
||
- uses: taiki-e/install-action@nextest | ||
|
||
- name: Unit and integration tests for all crates in workspace | ||
run: | | ||
just hotshot::${{ matrix.test_suites }} | ||
timeout-minutes: 60 | ||
env: | ||
RUST_BACKTRACE: full | ||
|
||
test-examples: | ||
strategy: | ||
fail-fast: false | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
name: Checkout Repository | ||
|
||
- name: Install Rust | ||
uses: mkroening/rust-toolchain-toml@main | ||
|
||
- uses: Swatinem/rust-cache@v2 | ||
name: Enable Rust Caching | ||
with: | ||
shared-key: "hotshot-examples" | ||
cache-on-failure: "true" | ||
save-if: ${{ github.ref == 'refs/heads/main' }} | ||
|
||
- uses: taiki-e/install-action@just | ||
|
||
- name: Test examples | ||
run: | | ||
just hotshot::example all-push-cdn -- --config_file ./hotshot-orchestrator/run-config.toml | ||
timeout-minutes: 20 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
test-ci-rest *ARGS: | ||
echo Running unit tests | ||
RUST_LOG=error cargo nextest run -E 'not (test(tests_1) | test(tests_2) | test(tests_3) | test(tests_4) | test(tests_5) | test(tests_6))' --profile hotshot --lib --bins --tests --benches --workspace --no-fail-fast {{ARGS}} | ||
|
||
test-ci-1: | ||
echo Running integration test group 1 | ||
RUST_LOG=error cargo nextest run --profile hotshot --test tests_1 --no-fail-fast | ||
|
||
test-ci-2: | ||
echo Running integration test group 2 | ||
RUST_LOG=error cargo nextest run --profile hotshot --test tests_2 --no-fail-fast | ||
|
||
test-ci-3: | ||
echo Running integration test group 3 | ||
RUST_LOG=error cargo nextest run --profile hotshot --test tests_3 --no-fail-fast | ||
|
||
test-ci-4: | ||
echo Running integration test group 4 | ||
RUST_LOG=error cargo nextest run --profile hotshot --test tests_4 --no-fail-fast | ||
|
||
test-ci-5: | ||
echo Running integration test group 5 | ||
RUST_LOG=error cargo nextest run --profile hotshot --test tests_5 --no-fail-fast | ||
|
||
test-ci-6-1: | ||
echo Running integration test group 6 | ||
RUST_LOG=error cargo nextest run --profile hotshot --test tests_6 --no-fail-fast --partition hash:1/6 | ||
|
||
test-ci-6-2: | ||
echo Running integration test group 6 | ||
RUST_LOG=error cargo nextest run --profile hotshot --test tests_6 --no-fail-fast --partition hash:2/6 | ||
|
||
test-ci-6-3: | ||
echo Running integration test group 6 | ||
RUST_LOG=error cargo nextest run --profile hotshot --test tests_6 --no-fail-fast --partition hash:3/6 | ||
|
||
test-ci-6-4: | ||
echo Running integration test group 6 | ||
RUST_LOG=error cargo nextest run --profile hotshot --test tests_6 --no-fail-fast --partition hash:4/6 | ||
|
||
test-ci-6-5: | ||
echo Running integration test group 6 | ||
RUST_LOG=error cargo nextest run --profile hotshot --test tests_6 --no-fail-fast --partition hash:5/6 | ||
|
||
test-ci-6-6: | ||
echo Running integration test group 6 | ||
RUST_LOG=error cargo nextest run --profile hotshot --test tests_6 --no-fail-fast --partition hash:6/6 | ||
|
||
# Usage: | ||
# | ||
# just test memoryimpl_::test_success | ||
# | ||
# To display logs from a test run: | ||
# | ||
# just test memoryimpl_::test_success --nocapture | ||
test *ARGS: | ||
echo Running test {{ARGS}} | ||
cargo nextest run --profile hotshot {{ARGS}} | ||
|
||
example *ARGS: | ||
cargo run --package hotshot-examples --example {{ARGS}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
mod hotshot | ||
|
||
default: | ||
just --list | ||
|
||
|