nightly-tests #526
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
name: nightly-tests | |
# We run gateway_integration_test at different times, to avoid a nonce race between parallel runs. | |
on: | |
schedule: | |
- cron: '30 22 * * *' # Uses ubuntu runner. | |
- cron: '30 0 * * *' # Uses macos runner. | |
workflow_dispatch: # Uses ubuntu runner. | |
env: | |
PROTOC_VERSION: 25 # homebrew doesn't support minor versions | |
jobs: | |
GW-integration-test-ubuntu: | |
uses: ./.github/workflows/nightly-tests-call.yml | |
with: | |
os: ubuntu-latest | |
secrets: | |
INTEGRATION_TESTNET_NODE_URL: ${{ secrets.INTEGRATION_TESTNET_NODE_URL }} | |
INTEGRATION_TESTNET_SENDER_PRIVATE_KEY: ${{ secrets.INTEGRATION_TESTNET_SENDER_PRIVATE_KEY }} | |
SLACK_ALERT_CHANNEL: ${{ secrets.SLACK_ALERT_CHANNEL }} | |
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} | |
if: github.event.schedule != '30 0 * * *' | |
GW-integration-test-macos: | |
uses: ./.github/workflows/nightly-tests-call.yml | |
with: | |
os: macos-latest | |
secrets: | |
INTEGRATION_TESTNET_NODE_URL: ${{ secrets.INTEGRATION_TESTNET_NODE_URL }} | |
INTEGRATION_TESTNET_SENDER_PRIVATE_KEY: ${{ secrets.INTEGRATION_TESTNET_SENDER_PRIVATE_KEY }} | |
SLACK_ALERT_CHANNEL: ${{ secrets.SLACK_ALERT_CHANNEL }} | |
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} | |
if: github.event.schedule == '30 0 * * *' | |
executable-run: | |
runs-on: macos-latest | |
if: github.event.schedule == '30 0 * * *' | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
- uses: Swatinem/rust-cache@v2 | |
- run: mkdir data | |
- run: brew install protobuf@$PROTOC_VERSION | |
- name: Build node | |
run: cargo build -r | |
- name: Run executable | |
run: > | |
target/release/papyrus_node --base_layer.node_url ${{ secrets.CI_BASE_LAYER_NODE_URL }} | |
& sleep 30 ; kill $! | |
test: | |
runs-on: macos-latest | |
if: github.event.schedule == '30 0 * * *' | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
- uses: Swatinem/rust-cache@v2 | |
- run: npm install -g [email protected] | |
- run: brew install protobuf@$PROTOC_VERSION | |
- run: | | |
cargo test -r | |
env: | |
SEED: 0 | |
build-load-test: | |
runs-on: macos-latest | |
if: github.event.schedule == '30 0 * * *' | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
- uses: Swatinem/rust-cache@v2 | |
- run: cargo build -r -p papyrus_load_test | |
integration-test: | |
runs-on: macos-latest | |
if: github.event.schedule == '30 0 * * *' | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
- uses: Swatinem/rust-cache@v2 | |
- run: > | |
cargo test -r --test '*' -- --include-ignored --skip test_gw_integration_testnet; | |
cargo run -r -p papyrus_node --bin central_source_integration_test --features="futures-util tokio-stream" | |
# TODO(dvir): make this run only if the path 'crates/papyrus_storage/src/db/**' (same path as in the CI) was changed on the | |
# last day and increase the number of repetitions. | |
random-table-test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
- uses: Swatinem/rust-cache@v2 | |
- run: for run in {1..100}; do cargo test -r -p papyrus_storage -- --include-ignored common_prefix_compare_with_simple_table_random; done | |