forked from erigontech/erigon
-
Notifications
You must be signed in to change notification settings - Fork 0
160 lines (141 loc) · 5.78 KB
/
Copy pathtest-all-erigon.yml
File metadata and controls
160 lines (141 loc) · 5.78 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
name: All tests
on:
push:
branches:
- main
- 'release/**'
pull_request:
branches:
- main
types:
- opened
- reopened
- synchronize
- ready_for_review
schedule:
- cron: '20 16 * * *' # daily at 16:20 UTC
workflow_dispatch:
jobs:
#
# This first job is used to determine if changes are within out-of-scope dirs or files (in such case the tests are not run because they would be meaningless)
# NOTE: this logic is needed because the simple 'paths-ignore:' doesn't work since this workflow is set as a mandatory/required check for this repo
# - '**/.github/workflows/**' is currently commented to avoid unintended freeze in case of concurrent changes outside the excluded paths (further development will be done in due course)
#
source-of-changes:
runs-on: ubuntu-latest
outputs:
changed_files: ${{ steps.filter.outputs.changed_files }}
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Check for changes within out-of-scope dirs or files
id: filter
uses: dorny/paths-filter@v3
with:
filters: |
changed_files:
- 'dashboards/**'
# - '**/.github/workflows/**'
- '**/.github/workflows/backups-dashboards.yml'
tests-mac-linux:
needs: source-of-changes
concurrency:
# concurrency group: there can be at most one running and one pending job in a
# concurrency group at any time. So for commits on main/release, we use different
# concurrency group per commit; for other branches, we use a branch-level CG.
group: >-
${{
(github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/')) &&
format('{0}-{1}-{2}', github.workflow, matrix.os, github.run_id) ||
format('{0}-{1}-{2}', github.workflow, matrix.os, github.ref)
}}
cancel-in-progress: true
strategy:
matrix:
os:
- ubuntu-24.04
- macos-15
runs-on: ${{ matrix.os }}
steps:
- name: Cleanup space on Linux runner
if: runner.os == 'Linux' && needs.source-of-changes.outputs.changed_files != 'true'
run: |
rm -fr /opt/az \
/opt/microsoft \
/usr/share/dotnet \
/usr/share/miniconda \
/usr/share/swift
- name: Declare runners
if: needs.source-of-changes.outputs.changed_files != 'true'
run: |
set +x
echo "This workflow is being executed by this runner: $RUNNER_NAME"
- name: "Checkout code and submodules with large files (lfs)"
if: needs.source-of-changes.outputs.changed_files != 'true'
uses: actions/checkout@v6
with:
submodules: recursive
lfs: true
- name: Setup Go environment
if: needs.source-of-changes.outputs.changed_files != 'true'
uses: actions/setup-go@v6
with:
go-version: '1.25'
cache: ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/') }}
- name: Install dependencies on Linux
if: runner.os == 'Linux' && needs.source-of-changes.outputs.changed_files != 'true'
run: sudo apt update -y && sudo apt install -y build-essential
- name: Run all tests on ${{ matrix.os }}
env:
SKIP_FLAKY_TESTS: 'true'
if: needs.source-of-changes.outputs.changed_files != 'true'
run: GOGC=80 make test-all
- name: SonarCloud scan in case OS Linux and changed_files is not true
if: runner.os == 'Linux' && needs.source-of-changes.outputs.changed_files != 'true'
uses: SonarSource/sonarqube-scan-action@v7
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
continue-on-error: true
- name: This ${{ matrix.os }} check does not make sense for changes within out-of-scope directories
if: needs.source-of-changes.outputs.changed_files == 'true'
run: echo "This check does not make sense for changes within out-of-scope directories"
tests-windows:
needs: source-of-changes
concurrency:
group: >-
${{
(github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/')) &&
format('{0}-{1}-{2}', github.workflow, matrix.os, github.run_id) ||
format('{0}-{1}-{2}', github.workflow, matrix.os, github.ref)
}}
cancel-in-progress: true
strategy:
matrix:
os: [ windows-2025 ]
runs-on: ${{ matrix.os }}
steps:
- name: Configure Pagefile
uses: al-cheb/configure-pagefile-action@v1.5
with:
minimum-size: 8GB
disk-root: "C:"
- name: "Checkout code with submodules and large files (lfs) on ${{ matrix.os }}"
if: needs.source-of-changes.outputs.changed_files != 'true'
uses: actions/checkout@v6
with:
fetch-depth: 1
submodules: recursive
lfs: true
- name: Setup Go environment on ${{ matrix.os }}
if: needs.source-of-changes.outputs.changed_files != 'true'
uses: actions/setup-go@v6
with:
go-version: '1.25'
cache: ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/') }}
- name: Run all tests on ${{ matrix.os }}
if: needs.source-of-changes.outputs.changed_files != 'true'
run: .\wmake.ps1 test-all
- name: This ${{ matrix.os }} check does not make sense for changes within out-of-scope directories
if: needs.source-of-changes.outputs.changed_files == 'true'
run: echo "This check does not make sense for changes within out-of-scope directories"