-
Notifications
You must be signed in to change notification settings - Fork 2
136 lines (116 loc) · 3.37 KB
/
check_networks.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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
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 }}