Skip to content

Commit 80a9b7b

Browse files
Added GitHub action that runs macOS QA and ITs on a nightly basis.
1 parent 33c8cee commit 80a9b7b

File tree

1 file changed

+88
-0
lines changed

1 file changed

+88
-0
lines changed

.github/workflows/MacOsNightly.yml

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
name: macOS Nightly Build
2+
3+
on:
4+
schedule:
5+
# Run at 3:00 AM UTC every day (5:00 AM CEST / 4:00 AM CET)
6+
- cron: "0 3 * * *"
7+
workflow_dispatch:
8+
inputs:
9+
skip_its:
10+
description: "Skip integration tests"
11+
required: false
12+
default: false
13+
type: boolean
14+
15+
# Only allow one instance of this workflow to run at a time
16+
concurrency:
17+
group: ${{ github.workflow }}
18+
cancel-in-progress: true
19+
20+
jobs:
21+
qa-macos:
22+
name: "Test macOS Python ${{ matrix.python-version }}"
23+
runs-on: github-macos-large
24+
permissions:
25+
id-token: write
26+
contents: read
27+
strategy:
28+
fail-fast: false
29+
matrix:
30+
python-version: ["3.9.18", "3.10.13", "3.11.7", "3.12.1", "3.13.2"]
31+
steps:
32+
- name: Checkout repository
33+
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
34+
35+
- name: Configure poetry
36+
uses: ./.github/actions/config-poetry
37+
with:
38+
python-version: ${{ matrix.python-version }}
39+
40+
- name: Execute the test suite
41+
run: poetry run pytest tests/
42+
43+
its-macos:
44+
name: "macOS Integration Tests"
45+
runs-on: github-macos-large
46+
if: ${{ !inputs.skip_its }}
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: Cache SonarQube
57+
uses: SonarSource/ci-github-actions/cache@v1
58+
id: sonarqube-cache
59+
with:
60+
path: sonarqube_cache/
61+
key: sonarqube-macos-${{ env.SONARQUBE_VERSION }}
62+
restore-keys: sonarqube-macos-
63+
64+
- name: Download SonarQube
65+
if: ${{ !steps.sonarqube-cache.outputs.cache-hit }}
66+
run: |
67+
mkdir -p sonarqube_cache
68+
if [ ! -f sonarqube_cache/sonarqube.zip ]; then
69+
wget -q https://binaries.sonarsource.com/Distribution/sonarqube/sonarqube-$SONARQUBE_VERSION.zip -O sonarqube_cache/sonarqube.zip
70+
fi
71+
72+
- name: Configure poetry
73+
uses: ./.github/actions/config-poetry
74+
75+
- name: Execute the integration tests
76+
run: ./.github/scripts/run_its.sh
77+
78+
notify-on-failure:
79+
name: "Notify on Failure"
80+
runs-on: github-ubuntu-latest-s
81+
needs: [qa-macos, its-macos]
82+
if: failure() && github.event_name == 'schedule'
83+
steps:
84+
- name: Notify team about nightly failure
85+
run: |
86+
echo "macOS nightly build failed. Check the workflow run for details."
87+
echo "Workflow URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
88+

0 commit comments

Comments
 (0)