-
Notifications
You must be signed in to change notification settings - Fork 85
100 lines (85 loc) · 3.32 KB
/
nightly-tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
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