@@ -29,7 +29,6 @@ linux_container_definition: &LINUX_CONTAINER_DEFINITION
2929 cpu : 3
3030 memory : 8G
3131
32-
3332win_vm_definition : &WINDOWS_VM_DEFINITION
3433 ec2_instance :
3534 experimental : true # see https://github.com/cirruslabs/cirrus-ci-docs/issues/1051
@@ -95,6 +94,31 @@ poetry_cache_template: &POETRY_CACHE
9594 eks_container :
9695 << : *LINUX_CONTAINER_DEFINITION
9796
97+
98+ .poetry_macos_template : &POETRY_MACOS_TEMPLATE
99+ << : *POETRY_CACHE
100+ jfrog_install_script :
101+ - brew install jfrog-cli
102+ - jf intro
103+ poetry_install_script :
104+ - brew install poetry
105+ - poetry config keyring.enabled false # Keyring is locked in macOS VM and not needed for downloading dependencies
106+ - jfrog config add repox --artifactory-url "$ARTIFACTORY_URL" --access-token "$ARTIFACTORY_PRIVATE_ACCESS_TOKEN"
107+ - jfrog poetry-config --server-id-resolve repox --repo-resolve sonarsource-pypi
108+ - jfrog poetry install --build-name="$CIRRUS_REPO_NAME" --build-number="$CI_BUILD_NUMBER"
109+
110+ macos_worker_template : &MACOS_WORKER_DEFINITION
111+ persistent_worker :
112+ isolation :
113+ tart :
114+ image : ghcr.io/cirruslabs/macos-sonoma-xcode:latest
115+ cpu : 3
116+ memory : 6G
117+ resources :
118+ tart-vms : 1
119+ labels :
120+ envname : prod
121+
98122mend_scan_task :
99123 << : *POETRY_LINUX_TEMPLATE
100124 depends_on :
@@ -171,6 +195,26 @@ qa_task:
171195 qa_script :
172196 - poetry run pytest tests/
173197
198+ qa_macos_task :
199+ alias : qa_macos
200+ only_if : $CIRRUS_CRON == "macos-its-cron"
201+ name : " [macOS] Run tests"
202+ << : [*MACOS_WORKER_DEFINITION, *POETRY_MACOS_TEMPLATE]
203+ env :
204+ PATH : " /Users/admin/.local/bin:$PATH"
205+ install_uv_script :
206+ - brew install uv
207+ test_39_script :
208+ - .cirrus/run_macos_tests.sh "3.9.18"
209+ test_310_script :
210+ - .cirrus/run_macos_tests.sh "3.10.13"
211+ test_311_script :
212+ - .cirrus/run_macos_tests.sh "3.11.7"
213+ test_312_script :
214+ - .cirrus/run_macos_tests.sh "3.12.1"
215+ test_313_script :
216+ - .cirrus/run_macos_tests.sh "3.13.2"
217+
174218qa_windows_task :
175219 name : " Test Windows"
176220 << : *POETRY_WIN_INSTALL
@@ -194,15 +238,20 @@ its_task:
194238 fingerprint_script : echo "sonarqube-$SONARQUBE_VERSION"
195239 << : *POETRY_LINUX_TEMPLATE
196240 its_script :
197- - unzip -q sonarqube_cache/sonarqube.zip -d sonarqube
198- - cd $(ls -d sonarqube/*/)
199- - ./bin/linux-x86-64/sonar.sh start
200- - cd -
201- - jfrog poetry-config --server-id-resolve repox --repo-resolve sonarsource-pypi
202- - jfrog poetry install
203- - unset SONAR_TOKEN
204- - unset SONAR_HOST_URL
205- - poetry run pytest --its tests/its
241+ - .cirrus/run_its.sh
242+
243+ its_macos_task :
244+ name : " [macOS] Integration Tests"
245+ alias : its_macos
246+ only_if : $CIRRUS_CRON == "macos-its-cron"
247+ # the macOS workers are only available from Monday 06:45 CEST to Friday 20:00 CEST (see https://xtranet-sonarsource.atlassian.net/wiki/spaces/Platform/pages/3447980037/MacOS+Persistent+Workers+User+Guide+-+Cirrus+CI)
248+ << : [*MACOS_WORKER_DEFINITION, *POETRY_MACOS_TEMPLATE]
249+ sonarqube_cache :
250+ folder : sonarqube_cache/
251+ populate_script : mkdir -p sonarqube_cache && wget -q https://binaries.sonarsource.com/Distribution/sonarqube/sonarqube-$SONARQUBE_VERSION.zip -O sonarqube_cache/sonarqube.zip
252+ fingerprint_script : echo "sonarqube-$SONARQUBE_VERSION"
253+ its_script :
254+ - .cirrus/run_its.sh
206255
207256promote_task :
208257 depends_on :
0 commit comments