forked from valory-xyz/meme-ooorr-test
-
Notifications
You must be signed in to change notification settings - Fork 0
220 lines (194 loc) · 6.98 KB
/
Copy pathmain_workflow.yml
File metadata and controls
220 lines (194 loc) · 6.98 KB
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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
name: main_workflow
on:
push:
branches:
- develop
- main
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
lock_check:
continue-on-error: False
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-24.04, macos-15, windows-2025]
python-version: ["3.10"]
defaults:
run:
shell: bash
timeout-minutes: 10
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
uses: astral-sh/setup-uv@v6
- name: Check if dependencies can be locked
run: uv lock --check
- name: Install dependencies
run: uv sync --all-groups -v
copyright_and_dependencies_check:
continue-on-error: False
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-24.04]
python-version: ["3.10"]
timeout-minutes: 30
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: pip install 'tomte[tox,cli] @ git+https://github.com/valory-xyz/tomte.git@v0.7.0' tox-uv
- name: Check copyright headers
run: tomte check-copyright --author valory
- name: License compatibility check
run: tomte tox -e liccheck
- name: Check dependencies
run: tomte tox -e check-dependencies
- name: Check third-party package hashes match upstream
run: tomte tox -e check-third-party-hashes
- name: Check doc links
run: |
tomte check-doc-links \
--url-skips https://soft-sly-slug.base-mainnet.quiknode.pro/f13d998d9d68685faeee903499e15b4b386a8b1c/ \
--url-skips https://developer.x.com/en/portal/dashboard \
--url-skips https://tenderly.co/ \
--url-skips https://foundry.paradigm.xyz \
--url-skips https://github.com/olas-operate-app \
--url-skips "https://gateway.autonolas.tech/ipfs/{ipfs_hash}" \
--url-skips https://agentsfun-indexer-production.up.railway.app \
--url-skips https://api.fireworks.ai/inference/v1/chat/completions \
--url-skips https://li.quest/v1/quote/toAmount \
--url-skips https://1rpc.io/base \
--url-skips https://afmdb.autonolas.tech \
--url-skips https://api.subgraph.autonolas.tech/api/proxy/autonolas-base \
--url-skips https://api.subgraph.autonolas.tech/api/proxy/marketplace-base
- name: Check doc IPFS hashes
run: tomte tox -e check-doc-hashes
linter_checks:
continue-on-error: False
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-24.04]
python-version: ["3.10"]
timeout-minutes: 30
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: pip install 'tomte[tox,cli] @ git+https://github.com/valory-xyz/tomte.git@v0.7.0' tox-uv
- name: Security checks
run: tomte tox -p -e safety -e bandit
- name: Check packages
run: tomte tox -e check-packages
- name: Check hash
run: tomte tox -e check-hash
- name: Code checks
run: tomte tox -p -e black-check -e isort-check -e flake8 -e mypy -e pylint -e darglint
- name: AbciApp consistency checks
run: |
tomte tox -e check-abci-docstrings
tomte tox -e check-abciapp-specs
tomte tox -e check-handlers
scan:
name: gitleaks
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- uses: actions/setup-python@v6
with:
python-version: "3.10"
- run: |
wget https://github.com/gitleaks/gitleaks/releases/download/v8.21.2/gitleaks_8.21.2_linux_x64.tar.gz
tar -xzf gitleaks_8.21.2_linux_x64.tar.gz
sudo install gitleaks /usr/bin
pip install 'tomte[tox,cli] @ git+https://github.com/valory-xyz/tomte.git@v0.7.0' tox-uv
tomte tox -e gitleaks
test:
continue-on-error: False
needs:
- lock_check
- copyright_and_dependencies_check
- linter_checks
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-24.04, macos-15, windows-2025]
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
timeout-minutes: 120
steps:
- uses: actions/checkout@v6
with:
submodules: recursive
- uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- if: matrix.os == 'ubuntu-24.04'
name: Install dependencies (ubuntu-24.04)
run: |
sudo apt-get update --fix-missing
sudo apt-get autoremove
sudo apt-get autoclean
pip install 'tomte[tox,cli] @ git+https://github.com/valory-xyz/tomte.git@v0.7.0' tox-uv
pip install --user --upgrade setuptools
- if: matrix.os == 'ubuntu-24.04'
name: Packages unit tests ubuntu-24.04
run: |
tomte tox -e py${{ matrix.python-version }}-linux
- if: matrix.os == 'macos-15'
name: Install dependencies (macos-15)
run: |
pip install 'tomte[tox,cli] @ git+https://github.com/valory-xyz/tomte.git@v0.7.0' tox-uv
pip install --user --upgrade setuptools
- if: matrix.os == 'macos-15'
name: Packages unit tests macos-15
run: |
tomte tox -e py${{ matrix.python-version }}-darwin
- if: matrix.os == 'windows-2025'
name: Install dependencies (windows-2025)
run: |
python -m pip install -U pip
pip install 'tomte[tox,cli] @ git+https://github.com/valory-xyz/tomte.git@v0.7.0' tox-uv
pip install --user --upgrade setuptools
- if: matrix.os == 'windows-2025'
name: Packages unit tests windows-2025
run: |
tomte tox -e py${{ matrix.python-version }}-win
- if: matrix.os == 'ubuntu-24.04' && matrix.python-version == '3.14'
name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml
flags: unittests
name: codecov-umbrella
fail_ci_if_error: false
all_checks_passed:
name: All checks passed
if: always()
needs:
- lock_check
- copyright_and_dependencies_check
- linter_checks
- scan
- test
runs-on: ubuntu-24.04
steps:
- name: Fail if any required job failed, was cancelled, or skipped
if: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') || contains(needs.*.result, 'skipped') }}
run: exit 1
- run: echo "All required checks passed."