-
Notifications
You must be signed in to change notification settings - Fork 10
92 lines (81 loc) · 2.58 KB
/
execute_remote_tests.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
# Run a set of tests on uat-testnet or dev-testnet
#
name: '[execute] Execute remote tests'
run-name: Run remote tests on dev/uat (${{ github.event_name }} ${{ github.event.inputs.environment }} )
on:
workflow_dispatch:
inputs:
environment:
type: choice
description: Environment
required: true
default: ten.dev
options:
- ten.dev
- ten.uat
- ten.sepolia
arguments:
description: 'Arguments to the pysys run'
required: true
default: '-e skip -e performance'
release:
type: choice
description: 'The release version of testnet'
required: true
default: main
options:
- main
- releases/v0.28
- releases/v0.27
jobs:
test-run:
runs-on: [self-hosted, Linux, X64, all-testnets]
steps:
- name: Set the variables
env:
DEFAULT_VERSION: 'main'
run: echo "VERSION=${{ github.event.inputs.release || env.DEFAULT_VERSION }}" >> $GITHUB_ENV
- name: 'Check out ten-test'
uses: actions/checkout@v3
with:
path: ./ten-test
- name: 'Check out go-ten code'
uses: actions/checkout@v3
with:
repository: ten-protocol/go-ten
path: ./go-ten
ref: ${{env.VERSION}}
- name: 'Build required artifacts for running tests'
run: |
cd ${{ github.workspace }}/ten-test
./get_artifacts.sh
ls -l ${{ github.workspace }}/ten-test/artifacts
- name: 'Run tests'
run: |
cd ${{ github.workspace }}/ten-test/tests
/usr/local/bin/pysys.py run -m ${{ github.event.inputs.environment }} ${{ github.event.inputs.arguments }}
- name: 'Collate pdf output'
if: always()
continue-on-error: true
run: |
cd ${{ github.workspace }}/ten-test
pdftk $(find . -name \*.pdf | sort) cat output results_graphs.pdf || true
- name: 'Upload pdf output'
uses: actions/upload-artifact@v4
if: always()
continue-on-error: true
with:
name: performance-artifact
path: |
${{ github.workspace }}/ten-test/results_graphs.pdf
if-no-files-found: ignore
retention-days: 1
- name: 'Upload testcase output'
uses: actions/upload-artifact@v4
if: failure()
with:
name: test-artifact
path: |
${{ github.workspace }}/ten-test/**/Output
!${{ github.workspace }}/ten-test/**/node_modules
retention-days: 1