-
Notifications
You must be signed in to change notification settings - Fork 4
95 lines (82 loc) · 2.78 KB
/
test.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
name: Test
on:
push:
branches: [main]
pull_request:
paths-ignore:
- "scripts/**"
- "**.md"
- ".vscode/**"
workflow_dispatch:
env:
POETRY_VERSION: 1.4.2
jobs:
test:
name: Test
runs-on: [self-hosted, heavy]
timeout-minutes: 10
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
fail-fast: false
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Load cached .local
id: cache-poetry
uses: actions/cache@v3
with:
path: /home/runner/.local
key: dotlocal-${{ matrix.python-version }}-${{ env.POETRY_VERSION }}
- name: Install Python + Retrieve Poetry dependencies from cache
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install poetry
if: steps.cache-poetry.outputs.cache-hit != 'true'
run: |
curl -sSL https://install.python-poetry.org/ | python - --version ${{ env.POETRY_VERSION }}
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Display Python version
run: |
python -c "import sys; print(sys.version)"
- name: Install poetry dependencies
run: poetry install
- name: Pull images from docker
run: |
docker pull rippleci/rippled:2.0.0-b4
docker pull rippleci/xbwd
- name: Run tests
id: runTests
run: |
poetry run coverage run -m pytest -xsvv tests
poetry run coverage report
env:
RIPPLED_EXE: docker
WITNESSD_EXE: docker
XCHAIN_CONFIG_DIR: /home/runner/work/xbridge-config
- name: Debug Test Failure (Chain Outputs)
if: always() && steps.runTests.outcome == 'failure'
run: |
echo "start of locking_chain logs"
cat $XCHAIN_CONFIG_DIR/locking_chain/debug.log
echo "start of issuing_chain logs"
cat $XCHAIN_CONFIG_DIR/issuing_chain/debug.log
env:
XCHAIN_CONFIG_DIR: /home/runner/work/xbridge-config
- name: Debug Test Failure (Witness Outputs)
if: always() && steps.runTests.outcome == 'failure'
run: |
cat $XCHAIN_CONFIG_DIR/witness0/witness.json
echo "start of witness0 logs"
cat $XCHAIN_CONFIG_DIR/witness0/witness.log
echo "start of witness1 logs"
cat $XCHAIN_CONFIG_DIR/witness1/witness.log
echo "start of witness2 logs"
cat $XCHAIN_CONFIG_DIR/witness2/witness.log
echo "start of witness3 logs"
cat $XCHAIN_CONFIG_DIR/witness3/witness.log
echo "start of witness4 logs"
cat $XCHAIN_CONFIG_DIR/witness4/witness.log
env:
XCHAIN_CONFIG_DIR: /home/runner/work/xbridge-config