forked from kaiachain/kaia
-
Notifications
You must be signed in to change notification settings - Fork 0
96 lines (86 loc) · 2.37 KB
/
test-pr-workflow.yml
File metadata and controls
96 lines (86 loc) · 2.37 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
name: Testing Workflow
on:
pull_request:
workflow_call:
permissions:
contents: read
# Run the 'build' job first to populate the build cache.
jobs:
build:
name: Build
uses: ./.github/workflows/test-executor-template.yml
with:
test_command: |
make kcn && make all -j
go vet ./...
test-linter:
needs: build
name: Test Linter
uses: ./.github/workflows/test-executor-template.yml
with:
fetch_depth: 0
test_command: |
BASE_BRANCH="${{ github.event.pull_request.base.ref }}"
go run build/ci.go lint -v --new-from-rev="origin/${BASE_BRANCH}"
test-node-network:
needs: build
name: Test Node and Networks
uses: ./.github/workflows/test-executor-template.yml
with:
test_command: |
make test-node
make test-networks
test-eestfixture:
needs: build
name: Test EEST Fixture
uses: ./.github/workflows/test-executor-template.yml
with:
cache_fixtures: true
test_command: make test-eestfixture
test-tests:
needs: build
name: Test Tests
uses: ./.github/workflows/test-executor-template.yml
with:
test_command: |
git clone --depth 1 https://github.com/kaiachain/kaia-core-tests.git tests/testdata
make test-tests
test-rpc:
needs: build
name: Test RPC
permissions:
contents: write
uses: ./.github/workflows/test-executor-template.yml
with:
runs_on: ubuntu-latest
install_python: true
test_command: |
make kcn
git clone --depth 1 https://github.com/kaiachain/kaia-rpc-tester.git
cd kaia-rpc-tester
cp ../build/bin/kcn script/cn/bin/
cd script
./set_CNonly.sh
cd ..
cp config_template.json config.json
python3 -m venv venv
source venv/bin/activate
pip3 install -r requirements.txt
python3 main.py --protocol rpc
# Service-dependent test jobs
test-service-dependent:
needs: build
name: Test Service Dependent Tests (e.g. redis,kafka)
uses: ./.github/workflows/test-executor-template.yml
with:
runs_on: kaia-xlarge-runner
with_services: true
test_command: |
make test-datasync
make test-storage
test-others:
needs: build
name: Test Others
uses: ./.github/workflows/test-executor-template.yml
with:
test_command: make test-others