Skip to content

Run remote tests on dev/uat (workflow_dispatch ten.uat ) #109

Run remote tests on dev/uat (workflow_dispatch ten.uat )

Run remote tests on dev/uat (workflow_dispatch ten.uat ) #109

# 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