Skip to content

Commit e358722

Browse files
committed
SCANPY-220 Migrate the mac os qa and its tasks
1 parent a1b5504 commit e358722

4 files changed

Lines changed: 77 additions & 89 deletions

File tree

.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: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
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: Checkout repository
25+
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
26+
27+
- name: Install mise and tools
28+
uses: jdx/mise-action@e3d7b8d67a7958d1207f6ed871e83b1ea780e7b0 # v3.3.1
29+
30+
- name: Configure poetry
31+
uses: ./.github/actions/config-poetry
32+
with:
33+
python-version: ${{ matrix.python-version }}
34+
35+
- name: Run tests for Python ${{ matrix.python-version }}
36+
run: |
37+
echo "========================================================================"
38+
echo "Running tests on macOS with Python version: ${{ matrix.python-version }}"
39+
echo "========================================================================"
40+
poetry run python --version
41+
poetry install
42+
poetry run pytest tests/
43+
44+
its_macos:
45+
name: "[macOS] Integration Tests"
46+
runs-on: macos-latest-xlarge
47+
permissions:
48+
id-token: write
49+
contents: read
50+
env:
51+
SONARQUBE_VERSION: 25.3.0.104237
52+
steps:
53+
- name: Checkout repository
54+
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
55+
56+
- name: Install mise and tools
57+
uses: jdx/mise-action@e3d7b8d67a7958d1207f6ed871e83b1ea780e7b0 # v3.3.1
58+
59+
- name: Cache SonarQube
60+
uses: SonarSource/ci-github-actions/cache@v1
61+
id: sonarqube-cache
62+
with:
63+
path: sonarqube_cache/
64+
key: sonarqube-25.3.0.104237
65+
restore-keys: cache-${{ runner.os }}-
66+
- name: Download SonarQube
67+
if: ${{ !steps.sonarqube-cache.outputs.cache-hit }}
68+
run: |
69+
mkdir -p sonarqube_cache
70+
if [ ! -f sonarqube_cache/sonarqube.zip ]; then
71+
wget -q https://binaries.sonarsource.com/Distribution/sonarqube/sonarqube-$SONARQUBE_VERSION.zip -O sonarqube_cache/sonarqube.zip
72+
fi
73+
- name: Configure poetry
74+
uses: ./.github/actions/config-poetry
75+
- name: Execute the integration tests
76+
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)