-
Notifications
You must be signed in to change notification settings - Fork 28
91 lines (81 loc) · 2.5 KB
/
test-workflow.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
name: Testing Workflow
on:
push:
branches:
- 'test/github-action'
jobs:
# Basic test jobs
build:
uses: ./.github/workflows/test-excutor.yml
with:
test_command: |
git config --global --add safe.directory /__w/kaia/kaia
make all
test-linter:
uses: ./.github/workflows/test-excutor.yml
with:
test_command: |
git config --global --add safe.directory /__w/kaia/kaia
go run build/ci.go lint -v --new-from-rev=dev
test-networks:
uses: ./.github/workflows/test-excutor.yml
with:
test_command: |
git config --global --add safe.directory /__w/kaia/kaia
make test-networks
test-node:
uses: ./.github/workflows/test-excutor.yml
with:
test_command: make test-node
test-tests:
uses: ./.github/workflows/test-excutor.yml
with:
test_command: |
git clone --depth 1 https://github.com/kaiachain/kaia-core-tests.git tests/testdata
make test-tests
test-rpc:
permissions: write-all
uses: ./.github/workflows/test-excutor.yml
with:
test_command: |
make kcn
git clone https://[email protected]/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
apt update
apt install python3.8 python3-venv -y
python3.8 -m venv --without-pip venv
chmod +x ./venv/bin/activate
./venv/bin/activate
curl https://bootstrap.pypa.io/get-pip.py | python
pip3 install -r requirements.txt
python3 main.py --protocol rpc
# Service-dependent test jobs
test-datasync:
uses: ./.github/workflows/test-other-excutor.yml
with:
test_command: make test-datasync
secrets:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
test-others:
uses: ./.github/workflows/test-other-excutor.yml
with:
test_command: make test-others
secrets:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
check-tagger:
runs-on: ubuntu-latest
steps:
- id: check-tag
run: |
if [[ ${{ github.event.ref }} =~ ^refs/tags/^v[0-9]+\.[0-9]+\.[0-9]+ ]]; then
echo "match=true" >> $GITHUB_OUTPUT
fi
- if: steps.check-tag.outputs.match == true
run: echo "Tag is good"