-
Notifications
You must be signed in to change notification settings - Fork 3
117 lines (113 loc) · 4.82 KB
/
test-pr.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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
name: 'Run Tests'
on:
pull_request:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
simple-tests:
runs-on: [self-hosted, linux, normal]
name: 'Simple Tests'
timeout-minutes: 30
steps:
- name: 'Check out code'
uses: actions/checkout@v3
with:
submodules: recursive
- name: 'Set up Docker'
uses: ./.github/actions/with-docker
with:
container-name: elrond-semantics-ci-${{ github.sha }}
- name: 'Build'
run: docker exec -t elrond-semantics-ci-${GITHUB_SHA} /bin/bash -c 'make build RELEASE=true -j4'
- name: 'Install Pykelrond'
run: docker exec -t elrond-semantics-ci-${GITHUB_SHA} /bin/bash -c 'make poetry-install'
- name: 'Run Python Unit Tests'
run: docker exec -t elrond-semantics-ci-${GITHUB_SHA} /bin/bash -c 'make TEST_CONCRETE_BACKEND=llvm unittest-python'
- name: 'Run Simple Test'
run: docker exec -t elrond-semantics-ci-${GITHUB_SHA} /bin/bash -c 'make TEST_CONCRETE_BACKEND=llvm test-simple -j6'
- name: 'Run Mandos Tests'
run: docker exec -t elrond-semantics-ci-${GITHUB_SHA} /bin/bash -c 'make TEST_CONCRETE_BACKEND=llvm mandos-test -j6'
- name: 'Tear down Docker'
if: always()
run: |
docker stop --time=0 elrond-semantics-ci-${GITHUB_SHA}
feature-tests:
runs-on: [self-hosted, linux, normal]
name: 'Feature Tests'
needs: [simple-tests]
timeout-minutes: 120
steps:
- name: 'Check out code'
uses: actions/checkout@v3
with:
submodules: recursive
- name: 'Set up Docker'
uses: ./.github/actions/with-docker
with:
container-name: elrond-semantics-ci-${{ github.sha }}
- name: 'Build'
run: docker exec -t elrond-semantics-ci-${GITHUB_SHA} /bin/bash -c 'make build RELEASE=true -j4'
- name: 'Install Pykelrond'
run: docker exec -t elrond-semantics-ci-${GITHUB_SHA} /bin/bash -c 'make poetry-install'
- name: 'Run Basic Feature Test'
run: docker exec -t elrond-semantics-ci-${GITHUB_SHA} /bin/bash -c 'make TEST_CONCRETE_BACKEND=llvm test-elrond-basic-features -j6'
- name: 'Run Alloc Feature Test'
run: docker exec -t elrond-semantics-ci-${GITHUB_SHA} /bin/bash -c 'make TEST_CONCRETE_BACKEND=llvm test-elrond-alloc-features -j6'
- name: 'Tear down Docker'
if: always()
run: |
docker stop --time=0 elrond-semantics-ci-${GITHUB_SHA}
example-contract-tests:
runs-on: [self-hosted, linux, normal]
name: 'Example Contract Tests'
needs: [feature-tests]
timeout-minutes: 60
steps:
- name: 'Check out code'
uses: actions/checkout@v3
with:
submodules: recursive
- name: 'Set up Docker'
uses: ./.github/actions/with-docker
with:
container-name: elrond-semantics-ci-${{ github.sha }}
- name: 'Build'
run: docker exec -t elrond-semantics-ci-${GITHUB_SHA} /bin/bash -c 'make build RELEASE=true -j4'
- name: 'Install Pykelrond'
run: docker exec -t elrond-semantics-ci-${GITHUB_SHA} /bin/bash -c 'make poetry-install'
- name: 'Run Adder Contract Test'
run: docker exec -t elrond-semantics-ci-${GITHUB_SHA} /bin/bash -c 'make TEST_CONCRETE_BACKEND=llvm test-elrond-adder'
- name: 'Run Crowdfunding ESDT Contract Test'
run: docker exec -t elrond-semantics-ci-${GITHUB_SHA} /bin/bash -c 'make TEST_CONCRETE_BACKEND=llvm test-elrond-crowdfunding-esdt'
- name: 'Run Multisig Contract Test'
run: docker exec -t elrond-semantics-ci-${GITHUB_SHA} /bin/bash -c 'make TEST_CONCRETE_BACKEND=llvm test-elrond-multisig'
- name: 'Tear down Docker'
if: always()
run: |
docker stop --time=0 elrond-semantics-ci-${GITHUB_SHA}
custom-contract-tests:
runs-on: [self-hosted, linux, normal]
name: 'Custom Contract Tests'
needs: [feature-tests]
timeout-minutes: 30
steps:
- name: 'Check out code'
uses: actions/checkout@v3
with:
submodules: recursive
- name: 'Set up Docker'
uses: ./.github/actions/with-docker
with:
container-name: elrond-semantics-ci-${{ github.sha }}
- name: 'Build'
run: docker exec -t elrond-semantics-ci-${GITHUB_SHA} /bin/bash -c 'make build RELEASE=true -j4'
- name: 'Install Pykelrond'
run: docker exec -t elrond-semantics-ci-${GITHUB_SHA} /bin/bash -c 'make poetry-install'
- name: 'Run Custom Contract Tests'
run: docker exec -t elrond-semantics-ci-${GITHUB_SHA} /bin/bash -c 'make TEST_CONCRETE_BACKEND=llvm test-custom-contracts'
- name: 'Tear down Docker'
if: always()
run: |
docker stop --time=0 elrond-semantics-ci-${GITHUB_SHA}