-
Notifications
You must be signed in to change notification settings - Fork 0
114 lines (107 loc) · 4.51 KB
/
Copy pathrust-lit-node-fault-tests.yml
File metadata and controls
114 lines (107 loc) · 4.51 KB
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
name: rust/lit-node-fault-tests
# Run fault tests if either one of the following triggers fire:
on:
# Every weekday at 03:00 UTC
schedule:
- cron: '0 3 * * 1-5'
# Enable manual triggers
workflow_dispatch: {}
workflow_call:
push:
paths:
- rust/lit-node/lit-node/**
- .github/workflows/rust-lit-node-fault-tests.yml
- scripts/github/**
branches:
- master
- develop
env:
CARGO_TERM_COLOR: always
RUST_LOG_STYLE: always
RUST_LOG: warn,lit_node=trace,test=trace
RUST_BACKTRACE: full
LIT_LOGGING_SERVICE_DISABLED: 1
LIT_CELO_DEPLOYER_PRIVATE_KEY: '0x3178746f7ae6a309d14444b4c6c85a96a4be2f53fa8950dea241d232f3e6c166'
LIT_ALFAJORES_DEPLOYER_PRIVATE_KEY: '0x3178746f7ae6a309d14444b4c6c85a96a4be2f53fa8950dea241d232f3e6c166'
LIT_MUMBAI_DEPLOYER_PRIVATE_KEY: '0x3178746f7ae6a309d14444b4c6c85a96a4be2f53fa8950dea241d232f3e6c166'
LIT_POLYGON_DEPLOYER_PRIVATE_KEY: '0x3178746f7ae6a309d14444b4c6c85a96a4be2f53fa8950dea241d232f3e6c166'
IN_GITHUB_CI: 1
LIT_LOGGING_TIMESTAMP: 1 # force adding timestamp since the CI timestamps are wrong
CARGO_INCREMENTAL: 0
IPFS_API_KEY: ${{ secrets.IPFS_API_KEY }}
CARGO_NET_GIT_FETCH_WITH_CLI: true
defaults:
run:
shell: bash
working-directory: rust/lit-node/lit-node
jobs:
# check if we need to build. this is necessary to make this workflow file be able to be run independently of master-trigger, which builds before calling this workflow. for example, on push to a branch, we want to run this workflow without having to run the master-trigger first.
build-if-needed:
uses: ./.github/workflows/rust-lit-node-build-if-needed.yml
with:
build_features: lit-actions,testing,proxy_chatter
secrets: inherit
run-tests:
needs: build-if-needed
runs-on: warp-ubuntu-latest-x64-8x # change to LargeRunner to run on github. Change to self-hosted to run on our own runner. Change to buildjet-8vcpu-ubuntu-2204 to run on buildjet with 8 cpus. Change to 8core to use github 8 core runner
timeout-minutes: 90
strategy:
matrix:
partition: [1, 2]
services:
anvil:
image: litptcl/anvil-lit:latest
ports:
- 8545:8545
- 8549:8549
credentials:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
steps:
- name: Install deps
working-directory: ${{ github.workspace }}
run: sudo apt-get update && sudo apt-get install -y zstd
- name: Checkout lit-assets
uses: actions/checkout@v6
with:
submodules: recursive
- name: Use Node.js
uses: WarpBuilds/setup-node@v4
with:
node-version: 18.17.0
cache: npm
cache-dependency-path: ${{ github.workspace }}/blockchain/contracts/package-lock.json
- name: Install dependencies for blockchain/contracts
working-directory: ${{ github.workspace }}/blockchain/contracts
run: npm install
- name: Run npx hardhat compile for blockchain/contracts
working-directory: ${{ github.workspace }}/blockchain/contracts
run: npx hardhat compile
- run: mkdir -p ~/.cargo/bin
- name: Install nextest
run: curl -LsSf https://get.nexte.st/latest/linux | tar zxf - -C "${CARGO_HOME:-$HOME/.cargo}/bin"
- name: Download archive
uses: WarpBuilds/cache@v1
with:
path: rust/lit-node/lit-node/nextest-archive.tar.zst
key: nextest-archive-${{ github.sha }}-lit-actions|testing|proxy_chatter
- name: Unzip archive so that we can get the lit_node binary
run: zstd -d -c nextest-archive.tar.zst | tar xf -
- name: Setup local files for testing
run: make setup-local-files
- name: Stop toxiproxy in case it's already running
run: sudo pkill -f toxiproxy-serve
- name: Install Toxiproxy Server
working-directory: ${{ github.workspace }}
run: sudo sh ./scripts/github/toxiproxy.sh --install-and-start-bg
- name: Run acceptance, component and integration tests.
run: '~/.cargo/bin/cargo-nextest nextest run --archive-file nextest-archive.tar.zst --final-status-level pass --profile fault-tests --partition count:${{ matrix.partition }}/2 --nocapture -- fault_tests'
- name: Notify slack fail
if: failure()
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_NOTIFICATIONS_BOT_TOKEN }}
uses: voxmedia/github-action-slack-notify-build@v1
with:
channel_id: C05U25GPPGA
status: FAILED
color: danger