Skip to content

Commit

Permalink
refactor forester github ci workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
sergeytimoshin committed Jan 6, 2025
1 parent b0033e4 commit d47530d
Showing 1 changed file with 47 additions and 21 deletions.
68 changes: 47 additions & 21 deletions .github/workflows/forester-tests.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
name: forester-tests

on:
push:
branches:
- main
paths:
- "forester/**"
- "forester-utils/**"
- "photon-api/**"
- ".github/workflows/forester-tests.yml"
pull_request:
branches:
- "**"
paths:
- "forester/**"
- "forester-utils/**"
- "photon-api/**"
- ".github/workflows/forester-tests.yml"
types:
Expand All @@ -19,40 +23,62 @@ on:
- reopened
- ready_for_review

name: forester-tests

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-address-batched:
runs-on: ubuntu-latest
timeout-minutes: 120

timeout-minutes: 60
steps:
- name: Checkout sources
uses: actions/checkout@v4

- uses: actions/checkout@v4
- name: Setup and build
uses: ./.github/actions/setup-and-build
- name: Build test program
run: |
source ./scripts/devenv.sh
cargo test-sbf -p create-address-test-program
- name: Run address batched tests
run: |
source ./scripts/devenv.sh
cargo test --package forester test_address_batched -- --nocapture
- name: Clean build artifacts before tests
shell: bash
test-state-batched:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
- name: Setup and build
uses: ./.github/actions/setup-and-build
- name: Run state batched tests
run: |
cargo clean
rm -rf target/debug/deps/*
source ./scripts/devenv.sh
cargo test --package forester test_state_batched -- --nocapture
- name: Check available disk space
shell: bash
test-2-foresters:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
- name: Setup and build
uses: ./.github/actions/setup-and-build
- name: Run 2 foresters test
run: |
df -h /
du -sh /home/runner/work/* | sort -hr | head -n 10
source ./scripts/devenv.sh
cargo test --package forester test_epoch_monitor_with_2_foresters -- --nocapture
- name: Run forester tests
test-double-registration:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- name: Setup and build
uses: ./.github/actions/setup-and-build
- name: Run epoch double registration test
run: |
source ./scripts/devenv.sh
cargo test-sbf -p create-address-test-program
npx nx test @lightprotocol/forester
cargo test --package forester test_epoch_double_registration -- --nocapture

0 comments on commit d47530d

Please sign in to comment.