forked from StellarRouter/StellarRouter
-
Notifications
You must be signed in to change notification settings - Fork 0
83 lines (74 loc) · 2.78 KB
/
Copy pathintegration-tests-manual.yml
File metadata and controls
83 lines (74 loc) · 2.78 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
name: Manual Integration Tests
on:
workflow_dispatch:
inputs:
test_filter:
description: 'Test filter (e.g., "full_flow" or leave empty for all)'
required: false
default: ''
verbose:
description: 'Verbose output'
required: false
type: boolean
default: true
jobs:
integration-test:
name: Run Integration Tests on Testnet
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: wasm32-unknown-unknown
- name: Cache dependencies
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-integration-${{ hashFiles('**/Cargo.lock') }}
- name: Build WASM contracts
run: cargo build --target wasm32-unknown-unknown --release
- name: Install Stellar CLI
run: |
cargo install --locked stellar-cli
stellar --version
- name: Run integration tests
run: |
if [ -z "${{ github.event.inputs.test_filter }}" ]; then
echo "Running all integration tests..."
if [ "${{ github.event.inputs.verbose }}" == "true" ]; then
cargo test --test integration_tests -- --ignored --test-threads=1 --nocapture
else
cargo test --test integration_tests -- --ignored --test-threads=1
fi
else
echo "Running filtered tests: ${{ github.event.inputs.test_filter }}"
if [ "${{ github.event.inputs.verbose }}" == "true" ]; then
cargo test --test integration_tests ${{ github.event.inputs.test_filter }} -- --ignored --nocapture
else
cargo test --test integration_tests ${{ github.event.inputs.test_filter }} -- --ignored
fi
fi
env:
STELLAR_RPC_URL: https://soroban-testnet.stellar.org
- name: Upload test results
if: always()
uses: actions/upload-artifact@v4
with:
name: integration-test-results-${{ github.run_number }}
path: |
target/debug/
retention-days: 7
- name: Test Summary
if: always()
run: |
echo "## Integration Test Results" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "- **Test Filter**: ${{ github.event.inputs.test_filter || 'All tests' }}" >> $GITHUB_STEP_SUMMARY
echo "- **Verbose**: ${{ github.event.inputs.verbose }}" >> $GITHUB_STEP_SUMMARY
echo "- **Network**: Stellar Testnet" >> $GITHUB_STEP_SUMMARY
echo "- **Run Number**: ${{ github.run_number }}" >> $GITHUB_STEP_SUMMARY