From 59f620681213c6476f0083e5fbdadb30db540c9c Mon Sep 17 00:00:00 2001 From: Rory Barnes Date: Tue, 24 Feb 2026 23:45:53 +0000 Subject: [PATCH] Restore separate test workflows for Linux, macOS Intel, and macOS Silicon Split the consolidated tests.yml back into three independent workflows with current runner labels: ubuntu-22.04/24.04, macos-15-intel, and macos-15/macos-26. Co-Authored-By: Claude Opus 4.6 --- .../workflows/{tests.yml => tests-linux.yml} | 30 ++++++------- .github/workflows/tests-macos-intel.yml | 43 +++++++++++++++++++ .github/workflows/tests-macos-silicon.yml | 43 +++++++++++++++++++ 3 files changed, 99 insertions(+), 17 deletions(-) rename .github/workflows/{tests.yml => tests-linux.yml} (79%) create mode 100644 .github/workflows/tests-macos-intel.yml create mode 100644 .github/workflows/tests-macos-silicon.yml diff --git a/.github/workflows/tests.yml b/.github/workflows/tests-linux.yml similarity index 79% rename from .github/workflows/tests.yml rename to .github/workflows/tests-linux.yml index 1be30645..34f04de0 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests-linux.yml @@ -1,4 +1,4 @@ -name: tests +name: tests-linux on: pull_request: @@ -7,12 +7,12 @@ on: jobs: tests: - name: 'py${{ matrix.python-version }} on ${{ matrix.os }}' + name: '${{ matrix.os }}:python-${{ matrix.python-version }}' runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: - os: [ubuntu-22.04, ubuntu-24.04, macos-15-intel, macos-26] + os: [ubuntu-22.04, ubuntu-24.04] python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"] steps: @@ -30,23 +30,26 @@ jobs: - name: Install dependencies run: | + sudo apt-get update + sudo apt-get install -y lcov python -m pip install --upgrade pip python -m pip install -e . python -m pip install pytest pytest-cov pytest-timeout - - name: Install lcov (Linux) - if: runner.os == 'Linux' - run: | - sudo apt-get update - sudo apt-get install -y lcov - - name: Build vplanet run: make opt - name: Run tests timeout-minutes: 20 run: | - python -m pytest tests/ --tb=short -v --timeout=300 --junitxml=junit/test-results-${{ matrix.os }}-${{ matrix.python-version }}.xml + python -m pytest tests/ --tb=short -v --timeout=300 --junitxml=junit/test-results.xml + + - name: Publish test results + uses: EnricoMi/publish-unit-test-result-action@v2 + if: always() + with: + files: junit/test-*.xml + check_name: Test Results (${{ matrix.os }} py${{ matrix.python-version }}) - name: Generate coverage if: matrix.os == 'ubuntu-22.04' && matrix.python-version == '3.9' @@ -61,10 +64,3 @@ jobs: flags: ${{ matrix.os }}-py${{ matrix.python-version }} name: ${{ matrix.os }}-py${{ matrix.python-version }} fail_ci_if_error: false - - - name: Publish test results - uses: EnricoMi/publish-unit-test-result-action@v2 - if: always() && runner.os == 'Linux' - with: - files: junit/test-*.xml - check_name: Test Results (py${{ matrix.python-version }} on ${{ matrix.os }}) diff --git a/.github/workflows/tests-macos-intel.yml b/.github/workflows/tests-macos-intel.yml new file mode 100644 index 00000000..182c5cf9 --- /dev/null +++ b/.github/workflows/tests-macos-intel.yml @@ -0,0 +1,43 @@ +name: tests-macos-intel + +on: + pull_request: + branches: [main] + workflow_dispatch: + +jobs: + tests: + name: '${{ matrix.os }}:python-${{ matrix.python-version }}' + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [macos-15-intel] + python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"] + + steps: + - uses: actions/checkout@v5 + with: + fetch-depth: 0 + + - name: Set up Python ${{ matrix.python-version }} + id: setup_python + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + cache: 'pip' + cache-dependency-path: setup.py + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip install -e . + python -m pip install pytest pytest-cov pytest-timeout + + - name: Build vplanet + run: make opt + + - name: Run tests + timeout-minutes: 20 + run: | + python -m pytest tests/ --tb=short -v --timeout=300 --junitxml=junit/test-results.xml diff --git a/.github/workflows/tests-macos-silicon.yml b/.github/workflows/tests-macos-silicon.yml new file mode 100644 index 00000000..2e8b73c9 --- /dev/null +++ b/.github/workflows/tests-macos-silicon.yml @@ -0,0 +1,43 @@ +name: tests-macos-silicon + +on: + pull_request: + branches: [main] + workflow_dispatch: + +jobs: + tests: + name: '${{ matrix.os }}:python-${{ matrix.python-version }}' + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [macos-15, macos-26] + python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"] + + steps: + - uses: actions/checkout@v5 + with: + fetch-depth: 0 + + - name: Set up Python ${{ matrix.python-version }} + id: setup_python + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + cache: 'pip' + cache-dependency-path: setup.py + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip install -e . + python -m pip install pytest pytest-cov pytest-timeout + + - name: Build vplanet + run: make opt + + - name: Run tests + timeout-minutes: 20 + run: | + python -m pytest tests/ --tb=short -v --timeout=300 --junitxml=junit/test-results.xml