Skip to content

Commit 100ed4d

Browse files
committed
SCANPY-220 Migrate the mac os qa and its tasks
1 parent 68e9ee9 commit 100ed4d

File tree

4 files changed

+83
-89
lines changed

4 files changed

+83
-89
lines changed

.cirrus.star

Lines changed: 0 additions & 4 deletions
This file was deleted.

.cirrus.yml

Lines changed: 0 additions & 84 deletions
This file was deleted.

.github/workflows/MacOsBuild.yml

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
name: macOS Build and Tests
2+
on:
3+
schedule:
4+
- cron: "45 4 * * 1-5" # Monday to Friday at 06:45 CEST (04:45 UTC)
5+
workflow_dispatch:
6+
pull_request:
7+
8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.ref }}
10+
cancel-in-progress: true
11+
12+
jobs:
13+
qa_macos:
14+
name: "[macOS] Test Python ${{ matrix.python-version }}"
15+
runs-on: macos-latest-xlarge
16+
permissions:
17+
id-token: write
18+
contents: read
19+
strategy:
20+
fail-fast: false
21+
matrix:
22+
python-version: ["3.9.18", "3.10.13", "3.11.7", "3.12.1", "3.13.2"]
23+
steps:
24+
- name: Setup Cloudflare WARP
25+
uses: SonarSource/gh-action_setup-cloudflare-warp@v1
26+
27+
- name: Checkout repository
28+
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
29+
30+
- name: Install mise and tools
31+
uses: jdx/mise-action@e3d7b8d67a7958d1207f6ed871e83b1ea780e7b0 # v3.3.1
32+
33+
- name: Configure poetry
34+
uses: ./.github/actions/config-poetry
35+
with:
36+
python-version: ${{ matrix.python-version }}
37+
38+
- name: Run tests for Python ${{ matrix.python-version }}
39+
run: |
40+
echo "========================================================================"
41+
echo "Running tests on macOS with Python version: ${{ matrix.python-version }}"
42+
echo "========================================================================"
43+
poetry run python --version
44+
poetry install
45+
poetry run pytest tests/
46+
47+
its_macos:
48+
name: "[macOS] Integration Tests"
49+
runs-on: macos-latest-xlarge
50+
permissions:
51+
id-token: write
52+
contents: read
53+
env:
54+
SONARQUBE_VERSION: 25.3.0.104237
55+
steps:
56+
- name: Setup Cloudflare WARP
57+
uses: SonarSource/gh-action_setup-cloudflare-warp@v1
58+
59+
- name: Checkout repository
60+
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
61+
62+
- name: Install mise and tools
63+
uses: jdx/mise-action@e3d7b8d67a7958d1207f6ed871e83b1ea780e7b0 # v3.3.1
64+
65+
- name: Cache SonarQube
66+
uses: SonarSource/ci-github-actions/cache@v1
67+
id: sonarqube-cache
68+
with:
69+
path: sonarqube_cache/
70+
key: sonarqube-25.3.0.104237
71+
restore-keys: cache-${{ runner.os }}-
72+
- name: Download SonarQube
73+
if: ${{ !steps.sonarqube-cache.outputs.cache-hit }}
74+
run: |
75+
mkdir -p sonarqube_cache
76+
if [ ! -f sonarqube_cache/sonarqube.zip ]; then
77+
wget -q https://binaries.sonarsource.com/Distribution/sonarqube/sonarqube-$SONARQUBE_VERSION.zip -O sonarqube_cache/sonarqube.zip
78+
fi
79+
- name: Configure poetry
80+
uses: ./.github/actions/config-poetry
81+
- name: Execute the integration tests
82+
run: ./.github/scripts/run_its.sh

tests/its/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def check_health(sonarqube_client: SonarQubeClient) -> bool:
3838
return False
3939

4040

41-
if "CIRRUS_OS" in os.environ:
41+
if "CI" in os.environ:
4242
from time import sleep
4343

4444
@pytest.fixture(scope="session")

0 commit comments

Comments
 (0)