-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: forester: batch ops (#1453)
* forester batch ops refactored * remove commented-out code and increase amount of retries in rpc retry config * forester github ci workflow: build create-address-test-program before running tests * refactor forester github ci workflow * increase wait_time in batched tests to 60 seconds * prioritization of the queue processing * fix update_test_indexer_after_append update logic in test indexer * add sbf_programs field initialization in rpc_client test setup
- Loading branch information
1 parent
0ae1c69
commit 9fc0542
Showing
36 changed files
with
2,292 additions
and
1,232 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,57 +1,66 @@ | ||
name: forester-tests | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
branches: [main] | ||
paths: | ||
- "forester/**" | ||
- "forester-utils/**" | ||
- "photon-api/**" | ||
- ".github/workflows/forester-tests.yml" | ||
pull_request: | ||
branches: | ||
- "**" | ||
branches: ["**"] | ||
paths: | ||
- "forester/**" | ||
- "forester-utils/**" | ||
- "photon-api/**" | ||
- ".github/workflows/forester-tests.yml" | ||
types: | ||
- opened | ||
- synchronize | ||
- reopened | ||
- ready_for_review | ||
|
||
name: forester-tests | ||
types: [opened, synchronize, reopened, ready_for_review] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
env: | ||
RUSTFLAGS: "--cfg tokio_unstable -D warnings" | ||
|
||
jobs: | ||
forester-tests: | ||
name: forester-tests | ||
if: github.event.pull_request.draft == false | ||
test: | ||
strategy: | ||
matrix: | ||
test-name: [ | ||
{name: "address-batched", command: "test_address_batched", timeout: 60, needs-test-program: true}, | ||
{name: "state-batched", command: "test_state_batched", timeout: 60, needs-test-program: false}, | ||
{name: "2-foresters", command: "test_epoch_monitor_with_2_foresters", timeout: 60, needs-test-program: false}, | ||
{name: "double-registration", command: "test_epoch_double_registration", timeout: 30, needs-test-program: false} | ||
] | ||
name: test-${{ matrix.test-name.name }} | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 120 | ||
|
||
timeout-minutes: ${{ matrix.test-name.timeout }} | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v4 | ||
|
||
- uses: actions/checkout@v4 | ||
- name: Setup and build | ||
uses: ./.github/actions/setup-and-build | ||
|
||
- name: Clean build artifacts before tests | ||
shell: bash | ||
run: | | ||
cargo clean | ||
rm -rf target/debug/deps/* | ||
- name: Check available disk space | ||
shell: bash | ||
run: | | ||
df -h / | ||
du -sh /home/runner/work/* | sort -hr | head -n 10 | ||
- name: Run forester tests | ||
- name: Build CLI | ||
run: | | ||
source ./scripts/devenv.sh | ||
npx nx build @lightprotocol/zk-compression-cli | ||
- name: Build test program | ||
if: ${{ matrix.test-name.needs-test-program }} | ||
run: | | ||
source ./scripts/devenv.sh | ||
cargo test-sbf -p create-address-test-program | ||
- name: Run ${{ matrix.test-name.name }} tests | ||
run: | | ||
source ./scripts/devenv.sh | ||
npx nx test @lightprotocol/forester | ||
cargo test --package forester ${{ matrix.test-name.command }} -- --nocapture |
Oops, something went wrong.