Run CI tests in parallel (#25271)

#21774

Improves run time by about 30%.

Things have been arranged in such a way that splitting modules out
further will be trivial in the future, such as breaking the different
integration test suited into their own units.


![image](https://github.com/user-attachments/assets/ead46e4c-6f14-406d-a29b-b25abc79c384)


![image](https://github.com/user-attachments/assets/3f7fd7f3-d7a8-4ff8-a184-646a72f1d015)
This commit is contained in:
Dante Catalfamo
2025-01-09 13:38:24 -05:00
committed by GitHub
parent 33c3ca6de8
commit e6fb647d95
2 changed files with 28 additions and 8 deletions
+5 -1
View File
@@ -42,7 +42,7 @@ jobs:
test-go:
strategy:
matrix:
suite: ["integration", "core"]
suite: ["integration", "core", "mysql", "fleetctl", "vuln"]
os: [ubuntu-latest]
mysql: ["mysql:8.0.36", "mysql:8.4.3", "mysql:9.1.0"] # make sure to update supported versions docs when this changes
isCron:
@@ -118,10 +118,13 @@ jobs:
- name: Run Go Tests
run: |
if [[ "${{ matrix.suite }}" == "core" ]]; then
CI_TEST_PKG=main
RUN_TESTS_ARG='-skip=^TestIntegrations'
elif [[ "${{ matrix.suite }}" == "integration" ]]; then
CI_TEST_PKG=main
RUN_TESTS_ARG='-run=^TestIntegrations'
else
CI_TEST_PKG="${{ matrix.suite }}"
RUN_TESTS_ARG=''
fi
GO_TEST_EXTRA_FLAGS="-v -race=$RACE_ENABLED -timeout=$GO_TEST_TIMEOUT $RUN_TESTS_ARG" \
@@ -135,6 +138,7 @@ jobs:
SAML_IDP_TEST=1 \
MAIL_TEST=1 \
NETWORK_TEST_GITHUB_TOKEN=${{ secrets.FLEET_RELEASE_GITHUB_PAT }} \
CI_TEST_PKG="${CI_TEST_PKG}" \
make test-go 2>&1 | tee /tmp/gotest.log
- name: Create mysql identifier without colon