Networks healthcheck #5979
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Networks healthcheck | |
on: | |
schedule: | |
- cron: '0 9,15 * * *' # Run at 09:00 and 15:00 every day | |
workflow_dispatch: | |
inputs: | |
ALLURE_JOB_RUN_ID: | |
type: string | |
description: ALLURE_JOB_RUN_ID service parameter. Leave blank. | |
required: false | |
ALLURE_USERNAME: | |
type: string | |
description: ALLURE_USERNAME service parameter. Leave blank. | |
required: false | |
pull_request: | |
env: | |
TEST_RE_RUNS: 2 | |
TEST_RE_RUNS_DELAY: 15 | |
ALLURE_ENDPOINT: https://nova.testops.cloud/ | |
ALLURE_PROJECT_ID: 136 | |
ALLURE_TOKEN: ${{ secrets.ALLURE_TOKEN }} | |
ALLURE_JOB_RUN_ID: ${{ github.event.inputs.ALLURE_JOB_RUN_ID }} | |
ALLURE_RESULTS: allure-results | |
permissions: | |
contents: write | |
jobs: | |
utils-test: | |
name: ${{ matrix.test_path }} | |
runs-on: ubuntu-latest | |
env: | |
PARALLEL_THREADS: 10 # Number or auto | |
strategy: | |
fail-fast: false | |
matrix: | |
test_path: | |
[ | |
"test-nodes-availability", | |
"test-networks-precision", | |
"test-network-chain-id", | |
"test-network-prefix", | |
"test-eth-availability", | |
"test-new-assets", | |
"test-nodes-synced", | |
"test-calls-availability", | |
"test-subquery-synced" | |
] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Checout to nova-utils | |
uses: actions/checkout@v4 | |
with: | |
repository: nova-wallet/nova-utils | |
ref: master | |
path: nova-utils | |
token: ${{ secrets.PAT }} | |
- name: Debug | |
run: | | |
ls -R | |
shell: bash | |
- name: Set up actual paths | |
uses: ./.github/workflows/setup-path | |
- name: Install dependencies | |
run: | | |
cd ./nova-utils | |
make init | |
- name: Install allurectl | |
uses: allure-framework/setup-allurectl@v1 | |
- name: Run test | |
run: | | |
cd ./nova-utils | |
allurectl watch -- make ${{ matrix.test_path }} | |
- name: Tar files | |
if: always() | |
run: | | |
cd ./nova-utils | |
tar -cvf allure-results.tar allure-results/ | |
- uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: ${{ matrix.test_path }} | |
path: ./nova-utils/allure-results.tar | |
report: | |
runs-on: ubuntu-latest | |
needs: [utils-test] | |
if: always() | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Download built artifact | |
uses: actions/download-artifact@v4 | |
with: | |
path: artifacts | |
- name: Unzip results | |
run: | | |
find artifacts -name allure-results.tar -exec tar -xvf {} \; | |
- uses: ./.github/workflows/report | |
with: | |
secret-token: ${{ secrets.GITHUB_TOKEN }} | |
keep-reports-history: 30 | |
alert: | |
runs-on: ubuntu-latest | |
needs: report | |
if: always() && (needs.utils-test.result == 'failure') | |
env: | |
GITHUB_WORKFLOW_URL: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} | |
steps: | |
- name: Report | |
uses: appleboy/telegram-action@master | |
with: | |
to: ${{ secrets.TELEGRAM_TO }} | |
token: ${{ secrets.TELEGRAM_TOKEN }} | |
message: | | |
Network tests failed, lets check: | |
Failed run: | |
${{ env.GITHUB_WORKFLOW_URL }} | |
Report: | |
https://novasamatech.github.io/test-runner/${{ github.run_number }} |