Skip to content

Services tests (devnet, 4) #60

Services tests (devnet, 4)

Services tests (devnet, 4) #60

Workflow file for this run

name: "Services tests"
run-name:
Services tests (${{ github.event.inputs.network || 'devnet' }}, ${{ github.event.inputs.numprocesses || '4'}})
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
schedule:
- cron: "41 3 * * *"
workflow_dispatch:
inputs:
network:
type: choice
default: devnet
required: true
description: "Stand name"
options:
- night-stand
- devnet
- private-devnet
numprocesses:
type: choice
default: 4
required: true
description: "Number of parallel jobs"
options:
- 4
- 8
- 12
- auto
env:
BUILD_URL: "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
SOLANA_URL: "${{ secrets.SOLANA_URL }}"
NUMPROCESSES: 4
IMAGE: ${{ vars.DOCKERHUB_ORG_NAME }}/neon_tests
CONTAINER: services-${{ github.run_id }}
jobs:
dockerize:
if: ${{ github.ref_name != 'develop'}}
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: "Dockerize neon tests"
id: requirements
uses: ./.github/actions/dockerize-neon-tests
with:
image_tag: ${{ github.sha }}
docker_username: ${{ secrets.DOCKER_USERNAME }}
docker_password: ${{ secrets.DOCKER_PASSWORD }}
tests:
name: "Services tests"
needs:
- dockerize
runs-on: ubuntu-20.04
env:
NETWORK: ${{ github.event.inputs.network || 'devnet'}}
# TODO Add parallel execution for test_ws_subscriber after https://neonlabs.atlassian.net/browse/NDEV-2064
NUMPROCESSES: 1
if: |
always() &&
!contains(needs.*.result, 'failure') &&
!contains(needs.*.result, 'cancelled')
steps:
- uses: actions/checkout@v3
- name: "Define image tag"
id: image_tag
uses: ./.github/actions/define-image-tag
- name: Run docker container
run: |
docker pull ${{ env.IMAGE }}:${{ steps.image_tag.outputs.tag }}
docker run -i -d -e CI -e GITHUB_RUN_ID -e GITHUB_WORKFLOW -e BANK_PRIVATE_KEY=${{ secrets.BANK_PRIVATE_KEY }} -e PROXY_URL -e SOLANA_URL --name=${{ env.CONTAINER }} ${{ env.IMAGE }}:${{ steps.image_tag.outputs.tag }} /bin/bash
- name: "Run services tests"
timeout-minutes: 60
id: services
run: |
docker exec -i ${{ env.CONTAINER }} \
python3 ./clickfile.py run services -n ${{ env.NETWORK }} --numprocesses ${{ env.NUMPROCESSES }}
- name: "Notify on failure."
if: failure()
run: |
docker exec -i ${{ env.CONTAINER }} \
python3 ./clickfile.py send-notification -u ${{ secrets.SLACK_QA_CHANNEL_URL }} \
-b ${{ env.BUILD_URL }} -n ${{ env.NETWORK }}
- name: "Generate allure report"
if: always()
id: requirements
uses: ./.github/actions/generate-allure-report
with:
container: ${{ env.CONTAINER }}
network: ${{ env.NETWORK }}
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
tests_name: services
- name: Remove docker container
if: always()
run: docker rm -f ${{ env.CONTAINER }}