Networks healthcheck #5884
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: | |
pull_request: | |
env: | |
TEST_RE_RUNS: 2 | |
TEST_RE_RUNS_DELAY: 15 | |
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: Run test | |
run: | | |
cd ./nova-utils | |
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 }} |