Skip to content

Commit b0bb651

Browse files
bors[bot]Tarak Ben Yousseftarakby
authored
Merge #4055
4055: optimize CI tests r=tarakby a=tarakby When retrying tests, the setup phases are also retried which slows downs the overall jobs. Setup includes installing tools and building relic lib. This PR separates the setup phase from running the actual tests. The setup steps won't be retried if the tests fail. Test jobs updated: - `unit-test` - `unit-test-modules` Co-authored-by: Tarak Ben Youssef <[email protected]> Co-authored-by: Tarak Ben Youssef <[email protected]>
2 parents 9303e27 + 75366b6 commit b0bb651

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

.github/workflows/ci.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -115,12 +115,14 @@ jobs:
115115
with:
116116
go-version: ${{ env.GO_VERSION }}
117117
cache: true
118+
- name: Setup tests (${{ matrix.targets.name }}
119+
run: VERBOSE=1 make -e GO_TEST_PACKAGES="${{ matrix.targets.packages }}" install-tools
118120
- name: Run tests (${{ matrix.targets.name }})
119121
uses: nick-fields/retry@v2
120122
with:
121123
timeout_minutes: 25
122124
max_attempts: 3
123-
command: VERBOSE=1 make -e GO_TEST_PACKAGES="${{ matrix.targets.packages }}" ci
125+
command: VERBOSE=1 make -e GO_TEST_PACKAGES="${{ matrix.targets.packages }}" test
124126

125127
# TODO(rbtz): re-enable when we fix exisiting races.
126128
#env:
@@ -162,17 +164,17 @@ jobs:
162164
with:
163165
go-version: ${{ env.GO_VERSION }}
164166
cache: true
167+
- name: Setup tests (${{ matrix.name }})
168+
run: make ${{ matrix.make1 }}
165169
- name: Run tests (${{ matrix.name }})
166170
env:
167171
RACE_DETECTOR: ${{ matrix.race }}
168172
uses: nick-fields/retry@v2
169173
with:
170174
timeout_minutes: 25
171175
max_attempts: ${{ matrix.retries }}
172-
# run `make1` target before running `make2` target inside each module's root
173-
command: |
174-
make ${{ matrix.make1 }}
175-
VERBOSE=1 make -C ${{ matrix.name }} ${{ matrix.make2 }}
176+
# run `make2` target inside each module's root
177+
command: VERBOSE=1 make -C ${{ matrix.name }} ${{ matrix.make2 }}
176178
- name: Upload coverage report
177179
uses: codecov/codecov-action@v3
178180
with:

0 commit comments

Comments
 (0)