Skip to content

Commit 6b55214

Browse files
authored
add regression test (xuperchain#1203)
* add regression test * add regression test 2&3
1 parent 1b4bc33 commit 6b55214

3 files changed

Lines changed: 120 additions & 0 deletions

File tree

.github/workflows/regression1.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
on: pull_request
2+
name: regression_test_1
3+
jobs:
4+
test:
5+
strategy:
6+
matrix:
7+
python-version: ["3.7"]
8+
go-version: [1.13.x]
9+
platform: [ubuntu-18.04]
10+
runs-on: ${{ matrix.platform }}
11+
steps:
12+
- name: Install Go
13+
uses: actions/setup-go@v1
14+
with:
15+
go-version: ${{ matrix.go-version }}
16+
- name: Set up Python ${{ matrix.python-version }}
17+
uses: actions/setup-python@v4
18+
with:
19+
python-version: ${{ matrix.python-version }}
20+
- name: Checkout code
21+
uses: actions/checkout@v2
22+
- name: Download testcase code
23+
run: |
24+
git clone https://github.com/xuperchain/regression-pytest.git
25+
cd regression-pytest
26+
python -m pip install --upgrade pip
27+
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
28+
- name: Deploy xchainnet for test
29+
run: |
30+
make && make testnet && cd testnet/
31+
sed -i' ' 's#level: debug#level: warn#g' node1/conf/log.yaml
32+
sed -i' ' 's#level: debug#level: warn#g' node2/conf/log.yaml
33+
sed -i' ' 's#level: debug#level: warn#g' node3/conf/log.yaml
34+
sh control_all.sh start
35+
pwd
36+
cd .. && cp output/bin/xchain-cli regression-pytest/client/bin/
37+
sleep 15
38+
- name: Test with pytest
39+
run: |
40+
cd regression-pytest && bash run_case.sh batch1

.github/workflows/regression2.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
on: pull_request
2+
name: regression_test_2
3+
jobs:
4+
test:
5+
strategy:
6+
matrix:
7+
python-version: ["3.7"]
8+
go-version: [1.13.x]
9+
platform: [ubuntu-18.04]
10+
runs-on: ${{ matrix.platform }}
11+
steps:
12+
- name: Install Go
13+
uses: actions/setup-go@v1
14+
with:
15+
go-version: ${{ matrix.go-version }}
16+
- name: Set up Python ${{ matrix.python-version }}
17+
uses: actions/setup-python@v4
18+
with:
19+
python-version: ${{ matrix.python-version }}
20+
- name: Checkout code
21+
uses: actions/checkout@v2
22+
- name: Download testcase code
23+
run: |
24+
git clone https://github.com/xuperchain/regression-pytest.git
25+
cd regression-pytest
26+
python -m pip install --upgrade pip
27+
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
28+
- name: Deploy xchainnet for test
29+
run: |
30+
make && make testnet && cd testnet/
31+
sed -i' ' 's#level: debug#level: warn#g' node1/conf/log.yaml
32+
sed -i' ' 's#level: debug#level: warn#g' node2/conf/log.yaml
33+
sed -i' ' 's#level: debug#level: warn#g' node3/conf/log.yaml
34+
sh control_all.sh start
35+
pwd
36+
cd .. && cp output/bin/xchain-cli regression-pytest/client/bin/
37+
sleep 15
38+
- name: Test with pytest
39+
run: |
40+
cd regression-pytest && bash run_case.sh batch2

.github/workflows/regression3.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
on: pull_request
2+
name: regression_test_3
3+
jobs:
4+
test:
5+
strategy:
6+
matrix:
7+
python-version: ["3.7"]
8+
go-version: [1.13.x]
9+
platform: [ubuntu-18.04]
10+
runs-on: ${{ matrix.platform }}
11+
steps:
12+
- name: Install Go
13+
uses: actions/setup-go@v1
14+
with:
15+
go-version: ${{ matrix.go-version }}
16+
- name: Set up Python ${{ matrix.python-version }}
17+
uses: actions/setup-python@v4
18+
with:
19+
python-version: ${{ matrix.python-version }}
20+
- name: Checkout code
21+
uses: actions/checkout@v2
22+
- name: Download testcase code
23+
run: |
24+
git clone https://github.com/xuperchain/regression-pytest.git
25+
cd regression-pytest
26+
python -m pip install --upgrade pip
27+
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
28+
- name: Deploy xchainnet for test
29+
run: |
30+
make && make testnet && cd testnet/
31+
sed -i' ' 's#level: debug#level: warn#g' node1/conf/log.yaml
32+
sed -i' ' 's#level: debug#level: warn#g' node2/conf/log.yaml
33+
sed -i' ' 's#level: debug#level: warn#g' node3/conf/log.yaml
34+
sh control_all.sh start
35+
pwd
36+
cd .. && cp output/bin/xchain-cli regression-pytest/client/bin/
37+
sleep 15
38+
- name: Test with pytest
39+
run: |
40+
cd regression-pytest && bash run_case.sh batch3

0 commit comments

Comments
 (0)