- Add push trigger for main branch - Add pull_request trigger for main branch - Add schedule trigger to run every 6 hours - Previously only had workflow_dispatch (manual trigger)
66 lines
1.9 KiB
YAML
66 lines
1.9 KiB
YAML
name: Cross-Node Transaction Testing
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
workflow_dispatch:
|
|
schedule:
|
|
- cron: '0 */6 * * *' # Run every 6 hours
|
|
|
|
concurrency:
|
|
group: cross-node-transaction-testing-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
transaction-test:
|
|
runs-on: debian
|
|
timeout-minutes: 15
|
|
|
|
steps:
|
|
- name: Clone repository
|
|
run: |
|
|
WORKSPACE="/var/lib/aitbc-workspaces/cross-node-transaction-testing"
|
|
rm -rf "$WORKSPACE"
|
|
mkdir -p "$WORKSPACE"
|
|
cd "$WORKSPACE"
|
|
git clone --depth 1 http://gitea.bubuit.net:3000/oib/aitbc.git repo
|
|
|
|
- name: Initialize job logging
|
|
run: |
|
|
cd /var/lib/aitbc-workspaces/cross-node-transaction-testing/repo
|
|
bash scripts/ci/setup-job-logging.sh
|
|
|
|
- name: Setup Python environment
|
|
run: |
|
|
cd /var/lib/aitbc-workspaces/cross-node-transaction-testing/repo
|
|
|
|
# Remove any existing venv to avoid cache corruption issues
|
|
rm -rf venv
|
|
|
|
bash scripts/ci/setup-python-venv.sh \
|
|
--repo-dir "$PWD" \
|
|
--venv-dir "$PWD/venv" \
|
|
--skip-requirements \
|
|
--extra-packages "requests psutil"
|
|
|
|
- name: Run cross-node transaction test
|
|
run: |
|
|
cd /var/lib/aitbc-workspaces/cross-node-transaction-testing/repo
|
|
CHAINS="ait-mainnet,ait-testnet" bash scripts/multi-node/cross-node-transaction-test.sh
|
|
|
|
- name: Transaction test report
|
|
if: always()
|
|
run: |
|
|
echo "=== Cross-Node Transaction Test Report ==="
|
|
if [ -f /var/log/aitbc/cross-node-transaction-test.log ]; then
|
|
tail -50 /var/log/aitbc/cross-node-transaction-test.log
|
|
fi
|
|
|
|
- name: Cleanup
|
|
if: always()
|
|
run: rm -rf /var/lib/aitbc-workspaces/cross-node-transaction-testing
|