diff --git a/.github/workflows/ci-cloud.yml b/.github/workflows/ci-cloud.yml index c236f93..dbd315b 100644 --- a/.github/workflows/ci-cloud.yml +++ b/.github/workflows/ci-cloud.yml @@ -37,7 +37,7 @@ jobs: strategy: fail-fast: false matrix: - os: ["ubuntu-22.04", "macOS-13", "windows-2022"] + os: ["ubuntu-22.04", "macOS-14", "windows-2022"] python-version: ["3.10"] requires: ["latest"] include: diff --git a/.github/workflows/ci-testing.yml b/.github/workflows/ci-testing.yml index 2647a5a..0c42d93 100644 --- a/.github/workflows/ci-testing.yml +++ b/.github/workflows/ci-testing.yml @@ -8,6 +8,10 @@ on: # Trigger the workflow on push or pull request, but only for the main branch schedule: - cron: "0 0 * * *" # every day at midnight UTC +concurrency: + group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} + defaults: run: shell: bash @@ -18,7 +22,7 @@ jobs: strategy: fail-fast: false matrix: - os: ["ubuntu-24.04", "macOS-13", "windows-2022"] + os: ["ubuntu-24.04", "macOS-14", "windows-2022"] python-version: ["3.9", "3.12"] requires: ["latest"] dependency: ["lightning"] @@ -26,12 +30,13 @@ jobs: - { os: "ubuntu-22.04", python-version: "3.9", requires: "oldest", dependency: "lightning" } - { os: "ubuntu-24.04", python-version: "3.12", requires: "latest", dependency: "pytorch_lightning" } - { os: "windows-2022", python-version: "3.12", requires: "latest", dependency: "pytorch_lightning" } - - { os: "macOS-13", python-version: "3.12", requires: "latest", dependency: "pytorch_lightning" } + - { os: "macOS-14", python-version: "3.12", requires: "latest", dependency: "pytorch_lightning" } # Timeout: https://stackoverflow.com/a/59076067/4521646 timeout-minutes: 35 env: TORCH_URL: "https://download.pytorch.org/whl/cpu/torch_stable.html" + DISABLE_MPS: ${{ matrix.os == 'macOS-14' && '1' || '0' }} steps: - uses: actions/checkout@v5 diff --git a/pyproject.toml b/pyproject.toml index a7e7ee3..fcf41ba 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -36,6 +36,7 @@ markers = [ ] filterwarnings = [ "error::FutureWarning", + "ignore:`isinstance\\(treespec, LeafSpec\\)` is deprecated.*:FutureWarning", ] xfail_strict = true junit_duration_report = "call" diff --git a/tests/test_io_cloud.py b/tests/test_io_cloud.py index 62c3779..09ed4b0 100644 --- a/tests/test_io_cloud.py +++ b/tests/test_io_cloud.py @@ -18,7 +18,8 @@ @pytest.mark.parametrize("name", ["/too/many/slashes", "org/model", "model-name"]) @pytest.mark.parametrize("in_studio", [True, False]) -def test_upload_wrong_model_name(name, in_studio, monkeypatch): +@mock.patch("litmodels.io.cloud.sdk_upload_model") +def test_upload_wrong_model_name(mock_sdk_upload, name, in_studio, monkeypatch): if in_studio: # mock env variables as it would run in studio monkeypatch.setenv("LIGHTNING_ORG", LIT_ORG)