Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .cirrus.star

This file was deleted.

84 changes: 0 additions & 84 deletions .cirrus.yml

This file was deleted.

9 changes: 6 additions & 3 deletions .github/actions/config-poetry/config-poetry.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,12 @@ set_build_env() {
}

config_poetry() {
jf config add repox --artifactory-url "$ARTIFACTORY_URL" --access-token "$ARTIFACTORY_ACCESS_TOKEN"
jf poetry-config --server-id-resolve repox --repo-resolve "$ARTIFACTORY_PYPI_REPO"
jf poetry install --build-name="$PROJECT" --build-number="$BUILD_NUMBER"
echo "config add repox"
jf config add repox --artifactory-url "$ARTIFACTORY_URL" --access-token "$ARTIFACTORY_ACCESS_TOKEN"
echo "poetry-config"
jf poetry-config --server-id-resolve repox --repo-resolve "$ARTIFACTORY_PYPI_REPO"
echo "poetry install"
jf poetry install --build-name="$PROJECT" --build-number="$BUILD_NUMBER" -v
}

main() {
Expand Down
81 changes: 81 additions & 0 deletions .github/workflows/MacOsBuild.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: macOS Build and Tests
on:
schedule:
- cron: "45 4 * * 1-5" # Monday to Friday at 06:45 CEST (04:45 UTC)
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
qa_macos:
name: "[macOS] Test Python ${{ matrix.python-version }}"
runs-on: macos-latest-xlarge
permissions:
id-token: write
contents: read
strategy:
fail-fast: false
matrix:
python-version: ["3.9.18", "3.10.13", "3.11.7", "3.12.1", "3.13.2"]
steps:
- name: Setup Cloudflare WARP
uses: SonarSource/gh-action_setup-cloudflare-warp@v1

- name: Checkout repository
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0

- name: Install mise and tools
uses: jdx/mise-action@e3d7b8d67a7958d1207f6ed871e83b1ea780e7b0 # v3.3.1

- name: Configure poetry
uses: ./.github/actions/config-poetry
with:
python-version: ${{ matrix.python-version }}

- name: Run tests for Python ${{ matrix.python-version }}
run: |
echo "========================================================================"
echo "Running tests on macOS with Python version: ${{ matrix.python-version }}"
echo "========================================================================"
poetry run python --version
poetry install
poetry run pytest tests/

its_macos:
name: "[macOS] Integration Tests"
runs-on: macos-latest-xlarge
permissions:
id-token: write
contents: read
env:
SONARQUBE_VERSION: 25.3.0.104237
steps:
- name: Setup Cloudflare WARP
uses: SonarSource/gh-action_setup-cloudflare-warp@v1

- name: Checkout repository
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0

- name: Install mise and tools
uses: jdx/mise-action@e3d7b8d67a7958d1207f6ed871e83b1ea780e7b0 # v3.3.1

- name: Cache SonarQube
uses: SonarSource/ci-github-actions/cache@v1
id: sonarqube-cache
with:
path: sonarqube_cache/
key: sonarqube-25.3.0.104237
restore-keys: cache-${{ runner.os }}-
- name: Download SonarQube
if: ${{ !steps.sonarqube-cache.outputs.cache-hit }}
run: |
mkdir -p sonarqube_cache
if [ ! -f sonarqube_cache/sonarqube.zip ]; then
wget -q https://binaries.sonarsource.com/Distribution/sonarqube/sonarqube-$SONARQUBE_VERSION.zip -O sonarqube_cache/sonarqube.zip
fi
- name: Configure poetry
uses: ./.github/actions/config-poetry
- name: Execute the integration tests
run: ./.github/scripts/run_its.sh
23 changes: 19 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
name: Build
on:
schedule:
- cron: "0 3 * * *" # Every day at 03:00 UTC
push:
branches: [master, branch-*, dogfood-*]
pull_request:
Expand Down Expand Up @@ -128,18 +130,23 @@ jobs:
artifactory-deployer-role: qa-deployer

qa:
name: "Test Python ${{ matrix.python-version }}"
runs-on: github-ubuntu-latest-s
name: "[${{ matrix.runner }}] Test Python ${{ matrix.python-version }}"
runs-on: ${{ matrix.runner }}
needs: [install_deps]
permissions:
id-token: write
contents: write
strategy:
fail-fast: false
matrix:
runner: [github-ubuntu-latest-s, macos-latest-xlarge]
python-version:
["3.9.18", "3.9.6", "3.10.13", "3.11.7", "3.12.1", "3.13.2", "3.14.0"]
steps:
- name: Setup Cloudflare WARP
if: ${{ matrix.runner == 'macos-latest-xlarge' }}
uses: SonarSource/gh-action_setup-cloudflare-warp@v1

- name: Checkout repository
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
- name: Configure poetry
Expand Down Expand Up @@ -167,14 +174,22 @@ jobs:
poetry run pytest tests/

its:
name: "Integration Tests"
runs-on: github-ubuntu-latest-s
name: "[${{ matrix.runner }}] Integration Tests"
runs-on: ${{ matrix.runner }}
permissions:
id-token: write
contents: write
strategy:
fail-fast: false
matrix:
runner: [github-ubuntu-latest-s, macos-latest-xlarge]
env:
SONARQUBE_VERSION: 25.3.0.104237
steps:
- name: Setup Cloudflare WARP
if: ${{ matrix.runner == 'macos-latest-xlarge' }}
uses: SonarSource/gh-action_setup-cloudflare-warp@v1

- name: Checkout repository
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
- name: Cache SonarQube
Expand Down
2 changes: 1 addition & 1 deletion tests/its/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def check_health(sonarqube_client: SonarQubeClient) -> bool:
return False


if "CIRRUS_OS" in os.environ:
if "CI" in os.environ:
from time import sleep

@pytest.fixture(scope="session")
Expand Down
Loading