-
Notifications
You must be signed in to change notification settings - Fork 1
119 lines (100 loc) · 2.79 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
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 }}