From 0b9a9752b70391ead10226e4e37300ce64e813a8 Mon Sep 17 00:00:00 2001 From: Philip Chmielowiec <67855069+philipc2@users.noreply.github.com> Date: Mon, 11 Aug 2025 14:34:14 -0600 Subject: [PATCH 01/14] Create main.yml --- .github/workflows/main.yml | 148 +++++++++++++++++++++++++++++++++++++ 1 file changed, 148 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 000000000..f6f5e5e31 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,148 @@ +name: CI +on: + pull_request: + workflow_dispatch: + schedule: + - cron: '0 0 * * *' # Daily “At 00:00” + +jobs: + test: + name: Python (${{ matrix.python-version }}, ${{ matrix.os }}) + runs-on: ${{ matrix.os }} + defaults: + run: + shell: bash -l {0} + + strategy: + fail-fast: false + matrix: + os: ["ubuntu-latest", "macos-latest", "macos-14", "windows-latest"] + python-version: ["3.10", "3.11", "3.12", "3.13"] + + steps: + - name: Cancel previous runs + uses: styfle/cancel-workflow-action@0.12.1 + with: + access_token: ${{ github.token }} + + - name: checkout + uses: actions/checkout@v4 + with: + token: ${{ github.token }} + + # Conda + - name: conda_setup (x64) + if: matrix.os != 'macos-14' + uses: conda-incubator/setup-miniconda@v3 + with: + activate-environment: uxarray_build + channel-priority: strict + python-version: ${{ matrix.python-version }} + channels: conda-forge + environment-file: ci/environment.yml + miniforge-variant: Miniforge3 + miniforge-version: latest + + - name: conda_setup (ARM64) + if: matrix.os == 'macos-14' + uses: conda-incubator/setup-miniconda@v3 + with: + activate-environment: uxarray_build + channel-priority: strict + python-version: ${{ matrix.python-version }} + channels: conda-forge + environment-file: ci/environment.yml + installer-url: https://github.com/conda-forge/miniforge/releases/download/23.11.0-0/Miniforge3-23.11.0-0-MacOSX-arm64.sh + + - name: Install uxarray + run: | + python -m pip install . --no-deps + + - name: conda list + run: conda list + + # Namespace + - name: Run Namespace Tests (timed + durations) + run: | + python - <<'PY' + import subprocess, sys, time + cmd = [sys.executable, "-m", "pytest", "test", "-q", "--durations=0"] + t0 = time.time() + p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, text=True) + with open("pytest_durations_ns.txt", "w", encoding="utf-8") as f: + for line in p.stdout: + print(line, end="") + f.write(line) + rc = p.wait() + dt = time.time() - t0 + with open("total_time_ns.txt", "w", encoding="utf-8") as f: + f.write(f"{dt:.3f} seconds") + sys.exit(rc) + PY + + # Coverage + - name: Run Coverage Tests (timed + durations) + env: + NUMBA_DISABLE_JIT: 1 + run: | + python - <<'PY' + import subprocess, sys, time + cmd = [sys.executable, "-m", "pytest", "test", "-v", + "--cov=./uxarray", "--cov-report=xml", "--durations=0"] + t0 = time.time() + p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, text=True) + with open("pytest_durations_cov.txt", "w", encoding="utf-8") as f: + for line in p.stdout: + print(line, end="") + f.write(line) + rc = p.wait() + dt = time.time() - t0 + with open("total_time_cov.txt", "w", encoding="utf-8") as f: + f.write(f"{dt:.3f} seconds") + sys.exit(rc) + PY + + # Summary + - name: Add timing summary + if: always() + run: | + echo "## Test Timing Summary" >> "$GITHUB_STEP_SUMMARY" + echo "" >> "$GITHUB_STEP_SUMMARY" + echo "- **Namespace tests total**: \`$(cat total_time_ns.txt 2>/dev/null || echo N/A)\`" >> "$GITHUB_STEP_SUMMARY" + echo "- **Coverage tests total**: \`$(cat total_time_cov.txt 2>/dev/null || echo N/A)\`" >> "$GITHUB_STEP_SUMMARY" + echo "" >> "$GITHUB_STEP_SUMMARY" + echo "
Namespace: pytest --durations=0" >> "$GITHUB_STEP_SUMMARY" + echo "" >> "$GITHUB_STEP_SUMMARY" + sed 's/^/ /' pytest_durations_ns.txt >> "$GITHUB_STEP_SUMMARY" || true + echo "" >> "$GITHUB_STEP_SUMMARY" + echo "
" >> "$GITHUB_STEP_SUMMARY" + echo "" >> "$GITHUB_STEP_SUMMARY" + echo "
Coverage: pytest --durations=0" >> "$GITHUB_STEP_SUMMARY" + echo "" >> "$GITHUB_STEP_SUMMARY" + sed 's/^/ /' pytest_durations_cov.txt >> "$GITHUB_STEP_SUMMARY" || true + echo "" >> "$GITHUB_STEP_SUMMARY" + echo "
" >> "$GITHUB_STEP_SUMMARY" + + # Upload artifacts + - name: Upload timing logs + if: always() + uses: actions/upload-artifact@v4 + with: + name: timings-${{ matrix.os }}-py${{ matrix.python-version }} + path: | + pytest_durations_ns.txt + total_time_ns.txt + pytest_durations_cov.txt + total_time_cov.txt + + - name: Upload code coverage to Codecov + if: github.repository == 'UXARRAY/uxarray' + uses: codecov/codecov-action@v5.4.3 + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + with: + file: ./coverage.xml + flags: unittests + env_vars: OS,PYTHON + name: codecov-umbrella + fail_ci_if_error: false From 85578cbefaa9fe703bbc848ac6d7a23a7d01c10a Mon Sep 17 00:00:00 2001 From: Philip Chmielowiec <67855069+philipc2@users.noreply.github.com> Date: Mon, 11 Aug 2025 14:34:42 -0600 Subject: [PATCH 02/14] Update and rename main.yml to ci-time.yml --- .github/workflows/{main.yml => ci-time.yml} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename .github/workflows/{main.yml => ci-time.yml} (99%) diff --git a/.github/workflows/main.yml b/.github/workflows/ci-time.yml similarity index 99% rename from .github/workflows/main.yml rename to .github/workflows/ci-time.yml index f6f5e5e31..3a6a47635 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/ci-time.yml @@ -1,4 +1,4 @@ -name: CI +name: CI-Time on: pull_request: workflow_dispatch: From 66310a0af11ea0e01c6307853575c66ec83aefbc Mon Sep 17 00:00:00 2001 From: Philip Chmielowiec <67855069+philipc2@users.noreply.github.com> Date: Mon, 11 Aug 2025 14:35:19 -0600 Subject: [PATCH 03/14] Update ci-time.yml Only use Python 3.13 --- .github/workflows/ci-time.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-time.yml b/.github/workflows/ci-time.yml index 3a6a47635..42421c39f 100644 --- a/.github/workflows/ci-time.yml +++ b/.github/workflows/ci-time.yml @@ -17,7 +17,7 @@ jobs: fail-fast: false matrix: os: ["ubuntu-latest", "macos-latest", "macos-14", "windows-latest"] - python-version: ["3.10", "3.11", "3.12", "3.13"] + python-version: ["3.13"] steps: - name: Cancel previous runs From d840f5637ab4a6befad82b5384f11a76ba00cd35 Mon Sep 17 00:00:00 2001 From: Philip Chmielowiec Date: Tue, 12 Aug 2025 09:56:14 -0600 Subject: [PATCH 04/14] update CI workflow to upload test time artifacts --- .github/workflows/ci-time.yml | 148 ---------------------------------- .github/workflows/ci.yml | 75 +++++++++++++++-- 2 files changed, 69 insertions(+), 154 deletions(-) delete mode 100644 .github/workflows/ci-time.yml diff --git a/.github/workflows/ci-time.yml b/.github/workflows/ci-time.yml deleted file mode 100644 index 42421c39f..000000000 --- a/.github/workflows/ci-time.yml +++ /dev/null @@ -1,148 +0,0 @@ -name: CI-Time -on: - pull_request: - workflow_dispatch: - schedule: - - cron: '0 0 * * *' # Daily “At 00:00” - -jobs: - test: - name: Python (${{ matrix.python-version }}, ${{ matrix.os }}) - runs-on: ${{ matrix.os }} - defaults: - run: - shell: bash -l {0} - - strategy: - fail-fast: false - matrix: - os: ["ubuntu-latest", "macos-latest", "macos-14", "windows-latest"] - python-version: ["3.13"] - - steps: - - name: Cancel previous runs - uses: styfle/cancel-workflow-action@0.12.1 - with: - access_token: ${{ github.token }} - - - name: checkout - uses: actions/checkout@v4 - with: - token: ${{ github.token }} - - # Conda - - name: conda_setup (x64) - if: matrix.os != 'macos-14' - uses: conda-incubator/setup-miniconda@v3 - with: - activate-environment: uxarray_build - channel-priority: strict - python-version: ${{ matrix.python-version }} - channels: conda-forge - environment-file: ci/environment.yml - miniforge-variant: Miniforge3 - miniforge-version: latest - - - name: conda_setup (ARM64) - if: matrix.os == 'macos-14' - uses: conda-incubator/setup-miniconda@v3 - with: - activate-environment: uxarray_build - channel-priority: strict - python-version: ${{ matrix.python-version }} - channels: conda-forge - environment-file: ci/environment.yml - installer-url: https://github.com/conda-forge/miniforge/releases/download/23.11.0-0/Miniforge3-23.11.0-0-MacOSX-arm64.sh - - - name: Install uxarray - run: | - python -m pip install . --no-deps - - - name: conda list - run: conda list - - # Namespace - - name: Run Namespace Tests (timed + durations) - run: | - python - <<'PY' - import subprocess, sys, time - cmd = [sys.executable, "-m", "pytest", "test", "-q", "--durations=0"] - t0 = time.time() - p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, text=True) - with open("pytest_durations_ns.txt", "w", encoding="utf-8") as f: - for line in p.stdout: - print(line, end="") - f.write(line) - rc = p.wait() - dt = time.time() - t0 - with open("total_time_ns.txt", "w", encoding="utf-8") as f: - f.write(f"{dt:.3f} seconds") - sys.exit(rc) - PY - - # Coverage - - name: Run Coverage Tests (timed + durations) - env: - NUMBA_DISABLE_JIT: 1 - run: | - python - <<'PY' - import subprocess, sys, time - cmd = [sys.executable, "-m", "pytest", "test", "-v", - "--cov=./uxarray", "--cov-report=xml", "--durations=0"] - t0 = time.time() - p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, text=True) - with open("pytest_durations_cov.txt", "w", encoding="utf-8") as f: - for line in p.stdout: - print(line, end="") - f.write(line) - rc = p.wait() - dt = time.time() - t0 - with open("total_time_cov.txt", "w", encoding="utf-8") as f: - f.write(f"{dt:.3f} seconds") - sys.exit(rc) - PY - - # Summary - - name: Add timing summary - if: always() - run: | - echo "## Test Timing Summary" >> "$GITHUB_STEP_SUMMARY" - echo "" >> "$GITHUB_STEP_SUMMARY" - echo "- **Namespace tests total**: \`$(cat total_time_ns.txt 2>/dev/null || echo N/A)\`" >> "$GITHUB_STEP_SUMMARY" - echo "- **Coverage tests total**: \`$(cat total_time_cov.txt 2>/dev/null || echo N/A)\`" >> "$GITHUB_STEP_SUMMARY" - echo "" >> "$GITHUB_STEP_SUMMARY" - echo "
Namespace: pytest --durations=0" >> "$GITHUB_STEP_SUMMARY" - echo "" >> "$GITHUB_STEP_SUMMARY" - sed 's/^/ /' pytest_durations_ns.txt >> "$GITHUB_STEP_SUMMARY" || true - echo "" >> "$GITHUB_STEP_SUMMARY" - echo "
" >> "$GITHUB_STEP_SUMMARY" - echo "" >> "$GITHUB_STEP_SUMMARY" - echo "
Coverage: pytest --durations=0" >> "$GITHUB_STEP_SUMMARY" - echo "" >> "$GITHUB_STEP_SUMMARY" - sed 's/^/ /' pytest_durations_cov.txt >> "$GITHUB_STEP_SUMMARY" || true - echo "" >> "$GITHUB_STEP_SUMMARY" - echo "
" >> "$GITHUB_STEP_SUMMARY" - - # Upload artifacts - - name: Upload timing logs - if: always() - uses: actions/upload-artifact@v4 - with: - name: timings-${{ matrix.os }}-py${{ matrix.python-version }} - path: | - pytest_durations_ns.txt - total_time_ns.txt - pytest_durations_cov.txt - total_time_cov.txt - - - name: Upload code coverage to Codecov - if: github.repository == 'UXARRAY/uxarray' - uses: codecov/codecov-action@v5.4.3 - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} - with: - file: ./coverage.xml - flags: unittests - env_vars: OS,PYTHON - name: codecov-umbrella - fail_ci_if_error: false diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 460726916..3df702436 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -62,16 +62,79 @@ jobs: run: | conda list - - - name: Run Namespace Tests + # Namespace (timed + durations) + - name: Run Namespace Tests (timed + durations) run: | - python -m pytest test + python - <<'PY' + import subprocess, sys, time + cmd = [sys.executable, "-m", "pytest", "test", "-q", "--durations=0"] + t0 = time.time() + p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, text=True) + with open("pytest_durations_ns.txt", "w", encoding="utf-8") as f: + for line in p.stdout: + print(line, end="") + f.write(line) + rc = p.wait() + dt = time.time() - t0 + with open("total_time_ns.txt", "w", encoding="utf-8") as f: + f.write(f"{dt:.3f} seconds") + sys.exit(rc) + PY - - name: Run Coverage Tests - run: | - python -m pytest test -v --cov=./uxarray --cov-report=xml + # Coverage (timed + durations) + - name: Run Coverage Tests (timed + durations) env: NUMBA_DISABLE_JIT: 1 + run: | + python - <<'PY' + import subprocess, sys, time + cmd = [sys.executable, "-m", "pytest", "test", "-v", + "--cov=./uxarray", "--cov-report=xml", "--durations=0"] + t0 = time.time() + p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, text=True) + with open("pytest_durations_cov.txt", "w", encoding="utf-8") as f: + for line in p.stdout: + print(line, end="") + f.write(line) + rc = p.wait() + dt = time.time() - t0 + with open("total_time_cov.txt", "w", encoding="utf-8") as f: + f.write(f"{dt:.3f} seconds") + sys.exit(rc) + PY + + # Summary in job log + - name: Add timing summary + if: always() + run: | + echo "## Test Timing Summary" >> "$GITHUB_STEP_SUMMARY" + echo "" >> "$GITHUB_STEP_SUMMARY" + echo "- **Namespace tests total**: \`$(cat total_time_ns.txt 2>/dev/null || echo N/A)\`" >> "$GITHUB_STEP_SUMMARY" + echo "- **Coverage tests total**: \`$(cat total_time_cov.txt 2>/dev/null || echo N/A)\`" >> "$GITHUB_STEP_SUMMARY" + echo "" >> "$GITHUB_STEP_SUMMARY" + echo "
Namespace: pytest --durations=0" >> "$GITHUB_STEP_SUMMARY" + echo "" >> "$GITHUB_STEP_SUMMARY" + sed 's/^/ /' pytest_durations_ns.txt >> "$GITHUB_STEP_SUMMARY" || true + echo "" >> "$GITHUB_STEP_SUMMARY" + echo "
" >> "$GITHUB_STEP_SUMMARY" + echo "" >> "$GITHUB_STEP_SUMMARY" + echo "
Coverage: pytest --durations=0" >> "$GITHUB_STEP_SUMMARY" + echo "" >> "$GITHUB_STEP_SUMMARY" + sed 's/^/ /' pytest_durations_cov.txt >> "$GITHUB_STEP_SUMMARY" || true + echo "" >> "$GITHUB_STEP_SUMMARY" + echo "
" >> "$GITHUB_STEP_SUMMARY" + + # Upload timing artifacts + - name: Upload timing logs + if: always() + uses: actions/upload-artifact@v4 + with: + name: timings-${{ matrix.os }}-py${{ matrix.python-version }} + path: | + pytest_durations_ns.txt + total_time_ns.txt + pytest_durations_cov.txt + total_time_cov.txt - name: Upload code coverage to Codecov if: github.repository == 'UXARRAY/uxarray' From e7b192eccf6a49984eb596e1949ab7ce9bbf01f8 Mon Sep 17 00:00:00 2001 From: Philip Chmielowiec Date: Tue, 12 Aug 2025 09:57:38 -0600 Subject: [PATCH 05/14] update comments --- .github/workflows/ci.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3df702436..8f3ccbf47 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -62,7 +62,6 @@ jobs: run: | conda list - # Namespace (timed + durations) - name: Run Namespace Tests (timed + durations) run: | python - <<'PY' @@ -81,7 +80,6 @@ jobs: sys.exit(rc) PY - # Coverage (timed + durations) - name: Run Coverage Tests (timed + durations) env: NUMBA_DISABLE_JIT: 1 @@ -103,7 +101,6 @@ jobs: sys.exit(rc) PY - # Summary in job log - name: Add timing summary if: always() run: | @@ -124,7 +121,6 @@ jobs: echo "" >> "$GITHUB_STEP_SUMMARY" echo "" >> "$GITHUB_STEP_SUMMARY" - # Upload timing artifacts - name: Upload timing logs if: always() uses: actions/upload-artifact@v4 From 153204b863f65388c3c05496f9db6064b2594629 Mon Sep 17 00:00:00 2001 From: Philip Chmielowiec Date: Tue, 12 Aug 2025 11:01:27 -0600 Subject: [PATCH 06/14] update CI workflow --- .github/workflows/ci.yml | 71 +++++++++++++++++++++++++++------------- 1 file changed, 48 insertions(+), 23 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8f3ccbf47..f2c904c51 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,12 +3,10 @@ on: pull_request: workflow_dispatch: schedule: - - cron: '0 0 * * *' # Daily “At 00:00” + - cron: '0 0 * * *' # Daily at 00:00 UTC jobs: test: - # if: | - # github.repository == 'UXARRAY/uxarray' name: Python (${{ matrix.python-version }}, ${{ matrix.os }}) runs-on: ${{ matrix.os }} defaults: @@ -18,52 +16,75 @@ jobs: strategy: fail-fast: false matrix: - os: [ "ubuntu-latest", "macos-latest", "macos-14", "windows-latest"] - python-version: [ "3.10", "3.11", "3.12", "3.13"] + os: ["ubuntu-latest", "macos-latest", "macos-14", "windows-latest"] + python-version: ["3.10", "3.11", "3.12", "3.13"] + steps: - name: Cancel previous runs uses: styfle/cancel-workflow-action@0.12.1 with: access_token: ${{ github.token }} - - name: checkout + - name: Checkout uses: actions/checkout@v5 with: token: ${{ github.token }} - name: conda_setup (x64) - uses: conda-incubator/setup-miniconda@v3 if: matrix.os != 'macos-14' + uses: conda-incubator/setup-miniconda@v3 with: - activate-environment: uxarray_build - channel-priority: strict - python-version: ${{ matrix.python-version }} - channels: conda-forge - environment-file: ci/environment.yml miniforge-variant: Miniforge3 miniforge-version: latest + channels: conda-forge + channel-priority: strict + use-mamba: true + cache-downloads: true - name: conda_setup (ARM64) - uses: conda-incubator/setup-miniconda@v3 if: matrix.os == 'macos-14' + uses: conda-incubator/setup-miniconda@v3 with: - activate-environment: uxarray_build - channel-priority: strict - python-version: ${{ matrix.python-version }} channels: conda-forge - environment-file: ci/environment.yml + channel-priority: strict + use-mamba: true + cache-downloads: true installer-url: https://github.com/conda-forge/miniforge/releases/download/23.11.0-0/Miniforge3-23.11.0-0-MacOSX-arm64.sh - - name: Install uxarray + - name: Compute conda paths + id: conda_paths run: | - python -m pip install . --no-deps + echo "CONDA_BASE=$(conda info --base)" >> $GITHUB_ENV + echo "CONDA_ENV_DIR=$(conda info --base)/envs/uxarray_build" >> $GITHUB_ENV + echo "PYVER=${{ matrix.python-version }}" >> $GITHUB_ENV - - name: conda list + - name: Cache conda env (uxarray_build) + id: conda-env-cache + uses: actions/cache@v4 + with: + path: ${{ env.CONDA_ENV_DIR }} + key: conda-env-${{ runner.os }}-py${{ matrix.python-version }}-${{ hashFiles('ci/environment.yml') }} + + - name: Create env (first run or cache miss) + if: steps.conda-env-cache.outputs.cache-hit != 'true' run: | + mamba create -y -n uxarray_build python=${{ matrix.python-version }} + mamba env update -n uxarray_build -f ci/environment.yml + + - name: Show conda info + run: | + conda activate uxarray_build + conda info conda list + - name: Install uxarray (no deps) + run: | + conda activate uxarray_build + python -m pip install . --no-deps + - name: Run Namespace Tests (timed + durations) run: | + conda activate uxarray_build python - <<'PY' import subprocess, sys, time cmd = [sys.executable, "-m", "pytest", "test", "-q", "--durations=0"] @@ -80,10 +101,12 @@ jobs: sys.exit(rc) PY - - name: Run Coverage Tests (timed + durations) + - name: Run Coverage Tests (timed + durations) # nightly only + if: github.event_name == 'schedule' env: NUMBA_DISABLE_JIT: 1 run: | + conda activate uxarray_build python - <<'PY' import subprocess, sys, time cmd = [sys.executable, "-m", "pytest", "test", "-v", @@ -132,11 +155,13 @@ jobs: pytest_durations_cov.txt total_time_cov.txt - - name: Upload code coverage to Codecov - if: github.repository == 'UXARRAY/uxarray' + - name: Upload code coverage to Codecov (nightly only) + if: github.event_name == 'schedule' && github.repository == 'UXARRAY/uxarray' uses: codecov/codecov-action@v5.4.3 env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + OS: ${{ matrix.os }} + PYTHON: ${{ matrix.python-version }} with: file: ./coverage.xml flags: unittests From 494f0fde5d8739e3eb79cb53549639ebcfa55c86 Mon Sep 17 00:00:00 2001 From: Philip Chmielowiec Date: Tue, 12 Aug 2025 11:12:40 -0600 Subject: [PATCH 07/14] update workflow for windows --- .github/workflows/ci.yml | 67 ++++++++++++---------------------------- 1 file changed, 19 insertions(+), 48 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f2c904c51..5f89d18cb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,6 +30,7 @@ jobs: with: token: ${{ github.token }} + # -- Miniforge/conda setup -- - name: conda_setup (x64) if: matrix.os != 'macos-14' uses: conda-incubator/setup-miniconda@v3 @@ -51,41 +52,44 @@ jobs: cache-downloads: true installer-url: https://github.com/conda-forge/miniforge/releases/download/23.11.0-0/Miniforge3-23.11.0-0-MacOSX-arm64.sh + # -- Compute paths & (non-Windows) env cache -- - name: Compute conda paths id: conda_paths run: | echo "CONDA_BASE=$(conda info --base)" >> $GITHUB_ENV echo "CONDA_ENV_DIR=$(conda info --base)/envs/uxarray_build" >> $GITHUB_ENV - echo "PYVER=${{ matrix.python-version }}" >> $GITHUB_ENV - - name: Cache conda env (uxarray_build) + - name: Cache conda env (non-Windows) + if: runner.os != 'Windows' id: conda-env-cache uses: actions/cache@v4 with: path: ${{ env.CONDA_ENV_DIR }} key: conda-env-${{ runner.os }}-py${{ matrix.python-version }}-${{ hashFiles('ci/environment.yml') }} - - name: Create env (first run or cache miss) - if: steps.conda-env-cache.outputs.cache-hit != 'true' + # -- Ensure env exists (robust even if cache says hit) -- + - name: Ensure environment exists run: | - mamba create -y -n uxarray_build python=${{ matrix.python-version }} - mamba env update -n uxarray_build -f ci/environment.yml + if ! conda env list | awk '{print $1}' | grep -qx "uxarray_build"; then + mamba create -y -n uxarray_build python=${{ matrix.python-version }} + mamba env update -n uxarray_build -f ci/environment.yml + fi + conda env list - name: Show conda info run: | - conda activate uxarray_build conda info - conda list + conda run -n uxarray_build python -c "import sys; print('Python in env:', sys.version)" + # -- Only reinstall UXarray each run -- - name: Install uxarray (no deps) run: | - conda activate uxarray_build - python -m pip install . --no-deps + conda run -n uxarray_build python -m pip install . --no-deps + # -- Tests (always) -- - name: Run Namespace Tests (timed + durations) run: | - conda activate uxarray_build - python - <<'PY' + conda run -n uxarray_build python - <<'PY' import subprocess, sys, time cmd = [sys.executable, "-m", "pytest", "test", "-q", "--durations=0"] t0 = time.time() @@ -101,13 +105,13 @@ jobs: sys.exit(rc) PY - - name: Run Coverage Tests (timed + durations) # nightly only + # -- Coverage (nightly only) -- + - name: Run Coverage Tests (timed + durations) if: github.event_name == 'schedule' env: NUMBA_DISABLE_JIT: 1 run: | - conda activate uxarray_build - python - <<'PY' + conda run -n uxarray_build python - <<'PY' import subprocess, sys, time cmd = [sys.executable, "-m", "pytest", "test", "-v", "--cov=./uxarray", "--cov-report=xml", "--durations=0"] @@ -135,36 +139,3 @@ jobs: echo "
Namespace: pytest --durations=0" >> "$GITHUB_STEP_SUMMARY" echo "" >> "$GITHUB_STEP_SUMMARY" sed 's/^/ /' pytest_durations_ns.txt >> "$GITHUB_STEP_SUMMARY" || true - echo "" >> "$GITHUB_STEP_SUMMARY" - echo "
" >> "$GITHUB_STEP_SUMMARY" - echo "" >> "$GITHUB_STEP_SUMMARY" - echo "
Coverage: pytest --durations=0" >> "$GITHUB_STEP_SUMMARY" - echo "" >> "$GITHUB_STEP_SUMMARY" - sed 's/^/ /' pytest_durations_cov.txt >> "$GITHUB_STEP_SUMMARY" || true - echo "" >> "$GITHUB_STEP_SUMMARY" - echo "
" >> "$GITHUB_STEP_SUMMARY" - - - name: Upload timing logs - if: always() - uses: actions/upload-artifact@v4 - with: - name: timings-${{ matrix.os }}-py${{ matrix.python-version }} - path: | - pytest_durations_ns.txt - total_time_ns.txt - pytest_durations_cov.txt - total_time_cov.txt - - - name: Upload code coverage to Codecov (nightly only) - if: github.event_name == 'schedule' && github.repository == 'UXARRAY/uxarray' - uses: codecov/codecov-action@v5.4.3 - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} - OS: ${{ matrix.os }} - PYTHON: ${{ matrix.python-version }} - with: - file: ./coverage.xml - flags: unittests - env_vars: OS,PYTHON - name: codecov-umbrella - fail_ci_if_error: false From 086374c22d009c498db7e17f39e2a5322b041648 Mon Sep 17 00:00:00 2001 From: Philip Chmielowiec Date: Tue, 12 Aug 2025 11:23:26 -0600 Subject: [PATCH 08/14] try to fix windows --- .github/workflows/ci.yml | 113 ++++++++++++++++++++++----------------- 1 file changed, 65 insertions(+), 48 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5f89d18cb..bb2b9dea0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,9 +19,12 @@ jobs: os: ["ubuntu-latest", "macos-latest", "macos-14", "windows-latest"] python-version: ["3.10", "3.11", "3.12", "3.13"] + env: + NUMBA_CACHE_DIR: ${{ runner.temp }}/numba_cache + steps: - name: Cancel previous runs - uses: styfle/cancel-workflow-action@0.12.1 + uses: styfle/cancel-workflow-action@v0.12.1 with: access_token: ${{ github.token }} @@ -30,66 +33,48 @@ jobs: with: token: ${{ github.token }} - # -- Miniforge/conda setup -- - - name: conda_setup (x64) - if: matrix.os != 'macos-14' - uses: conda-incubator/setup-miniconda@v3 - with: - miniforge-variant: Miniforge3 - miniforge-version: latest - channels: conda-forge - channel-priority: strict - use-mamba: true - cache-downloads: true + - name: Set micromamba arch + run: | + if [[ "${{ matrix.os }}" == "macos-14" ]]; then + echo "MM_ARCH=arm64" >> $GITHUB_ENV + else + echo "MM_ARCH=x64" >> $GITHUB_ENV + fi - - name: conda_setup (ARM64) - if: matrix.os == 'macos-14' - uses: conda-incubator/setup-miniconda@v3 + - name: Setup micromamba + env cache + uses: mamba-org/setup-micromamba@v1 with: - channels: conda-forge - channel-priority: strict - use-mamba: true + micromamba-version: "latest" + environment-name: uxarray_build + environment-file: ci/environment.yml + create-args: >- + python=${{ matrix.python-version }} + init-shell: bash + architecture: ${{ env.MM_ARCH }} cache-downloads: true - installer-url: https://github.com/conda-forge/miniforge/releases/download/23.11.0-0/Miniforge3-23.11.0-0-MacOSX-arm64.sh + cache-environment: true + cache-environment-key: >- + ${{ runner.os }}-py${{ matrix.python-version }}-${{ hashFiles('ci/environment.yml') }} - # -- Compute paths & (non-Windows) env cache -- - - name: Compute conda paths - id: conda_paths - run: | - echo "CONDA_BASE=$(conda info --base)" >> $GITHUB_ENV - echo "CONDA_ENV_DIR=$(conda info --base)/envs/uxarray_build" >> $GITHUB_ENV - - - name: Cache conda env (non-Windows) - if: runner.os != 'Windows' - id: conda-env-cache + - name: Cache Numba cache uses: actions/cache@v4 with: - path: ${{ env.CONDA_ENV_DIR }} - key: conda-env-${{ runner.os }}-py${{ matrix.python-version }}-${{ hashFiles('ci/environment.yml') }} - - # -- Ensure env exists (robust even if cache says hit) -- - - name: Ensure environment exists - run: | - if ! conda env list | awk '{print $1}' | grep -qx "uxarray_build"; then - mamba create -y -n uxarray_build python=${{ matrix.python-version }} - mamba env update -n uxarray_build -f ci/environment.yml - fi - conda env list + path: ${{ env.NUMBA_CACHE_DIR }} + key: numba-${{ runner.os }}-py${{ matrix.python-version }}-${{ hashFiles('uxarray/**/*.py') }} - name: Show conda info run: | - conda info - conda run -n uxarray_build python -c "import sys; print('Python in env:', sys.version)" + micromamba info + micromamba env list + micromamba run -n uxarray_build python -V - # -- Only reinstall UXarray each run -- - name: Install uxarray (no deps) run: | - conda run -n uxarray_build python -m pip install . --no-deps + micromamba run -n uxarray_build python -m pip install . --no-deps - # -- Tests (always) -- - name: Run Namespace Tests (timed + durations) run: | - conda run -n uxarray_build python - <<'PY' + micromamba run -n uxarray_build python - <<'PY' import subprocess, sys, time cmd = [sys.executable, "-m", "pytest", "test", "-q", "--durations=0"] t0 = time.time() @@ -105,13 +90,12 @@ jobs: sys.exit(rc) PY - # -- Coverage (nightly only) -- - name: Run Coverage Tests (timed + durations) if: github.event_name == 'schedule' env: NUMBA_DISABLE_JIT: 1 run: | - conda run -n uxarray_build python - <<'PY' + micromamba run -n uxarray_build python - <<'PY' import subprocess, sys, time cmd = [sys.executable, "-m", "pytest", "test", "-v", "--cov=./uxarray", "--cov-report=xml", "--durations=0"] @@ -139,3 +123,36 @@ jobs: echo "
Namespace: pytest --durations=0" >> "$GITHUB_STEP_SUMMARY" echo "" >> "$GITHUB_STEP_SUMMARY" sed 's/^/ /' pytest_durations_ns.txt >> "$GITHUB_STEP_SUMMARY" || true + echo "" >> "$GITHUB_STEP_SUMMARY" + echo "
" >> "$GITHUB_STEP_SUMMARY" + echo "" >> "$GITHUB_STEP_SUMMARY" + echo "
Coverage: pytest --durations=0" >> "$GITHUB_STEP_SUMMARY" + echo "" >> "$GITHUB_STEP_SUMMARY" + sed 's/^/ /' pytest_durations_cov.txt >> "$GITHUB_STEP_SUMMARY" || true + echo "" >> "$GITHUB_STEP_SUMMARY" + echo "
" >> "$GITHUB_STEP_SUMMARY" + + - name: Upload timing logs + if: always() + uses: actions/upload-artifact@v4 + with: + name: timings-${{ matrix.os }}-py${{ matrix.python-version }} + path: | + pytest_durations_ns.txt + total_time_ns.txt + pytest_durations_cov.txt + total_time_cov.txt + + - name: Upload code coverage to Codecov (nightly only) + if: github.event_name == 'schedule' && github.repository == 'UXARRAY/uxarray' + uses: codecov/codecov-action@v5.4.3 + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + OS: ${{ matrix.os }} + PYTHON: ${{ matrix.python-version }} + with: + file: ./coverage.xml + flags: unittests + env_vars: OS,PYTHON + name: codecov-umbrella + fail_ci_if_error: false From 9a91d41ee5439802dff439e30a6712a4de11818b Mon Sep 17 00:00:00 2001 From: Philip Chmielowiec Date: Tue, 12 Aug 2025 11:28:41 -0600 Subject: [PATCH 09/14] update numba cache --- .github/workflows/ci.yml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bb2b9dea0..163effaa5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,8 +19,6 @@ jobs: os: ["ubuntu-latest", "macos-latest", "macos-14", "windows-latest"] python-version: ["3.10", "3.11", "3.12", "3.13"] - env: - NUMBA_CACHE_DIR: ${{ runner.temp }}/numba_cache steps: - name: Cancel previous runs @@ -56,12 +54,6 @@ jobs: cache-environment-key: >- ${{ runner.os }}-py${{ matrix.python-version }}-${{ hashFiles('ci/environment.yml') }} - - name: Cache Numba cache - uses: actions/cache@v4 - with: - path: ${{ env.NUMBA_CACHE_DIR }} - key: numba-${{ runner.os }}-py${{ matrix.python-version }}-${{ hashFiles('uxarray/**/*.py') }} - - name: Show conda info run: | micromamba info From 34c6f87e71cf93b3522829e86b6ff1167c84e782 Mon Sep 17 00:00:00 2001 From: Philip Chmielowiec Date: Tue, 12 Aug 2025 11:29:29 -0600 Subject: [PATCH 10/14] revert numba change --- .github/workflows/ci.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 163effaa5..bb2b9dea0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,6 +19,8 @@ jobs: os: ["ubuntu-latest", "macos-latest", "macos-14", "windows-latest"] python-version: ["3.10", "3.11", "3.12", "3.13"] + env: + NUMBA_CACHE_DIR: ${{ runner.temp }}/numba_cache steps: - name: Cancel previous runs @@ -54,6 +56,12 @@ jobs: cache-environment-key: >- ${{ runner.os }}-py${{ matrix.python-version }}-${{ hashFiles('ci/environment.yml') }} + - name: Cache Numba cache + uses: actions/cache@v4 + with: + path: ${{ env.NUMBA_CACHE_DIR }} + key: numba-${{ runner.os }}-py${{ matrix.python-version }}-${{ hashFiles('uxarray/**/*.py') }} + - name: Show conda info run: | micromamba info From 9b27ab363b6b01cc9eb91c44d11fed553c7c469c Mon Sep 17 00:00:00 2001 From: Philip Chmielowiec Date: Tue, 12 Aug 2025 13:56:43 -0600 Subject: [PATCH 11/14] update CI workflow --- .github/workflows/ci.yml | 36 ++++++++++++------------------------ 1 file changed, 12 insertions(+), 24 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bb2b9dea0..18b9742df 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,14 +1,21 @@ name: CI + on: pull_request: workflow_dispatch: schedule: - cron: '0 0 * * *' # Daily at 00:00 UTC +# Avoid duplicate work; cancel in-progress runs for the same ref (except main) +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} + jobs: test: name: Python (${{ matrix.python-version }}, ${{ matrix.os }}) runs-on: ${{ matrix.os }} + timeout-minutes: 90 defaults: run: shell: bash -l {0} @@ -16,45 +23,26 @@ jobs: strategy: fail-fast: false matrix: - os: ["ubuntu-latest", "macos-latest", "macos-14", "windows-latest"] + os: ["ubuntu-latest", "macos-latest", "windows-latest"] python-version: ["3.10", "3.11", "3.12", "3.13"] env: NUMBA_CACHE_DIR: ${{ runner.temp }}/numba_cache steps: - - name: Cancel previous runs - uses: styfle/cancel-workflow-action@v0.12.1 - with: - access_token: ${{ github.token }} - - name: Checkout uses: actions/checkout@v5 - with: - token: ${{ github.token }} - - - name: Set micromamba arch - run: | - if [[ "${{ matrix.os }}" == "macos-14" ]]; then - echo "MM_ARCH=arm64" >> $GITHUB_ENV - else - echo "MM_ARCH=x64" >> $GITHUB_ENV - fi - name: Setup micromamba + env cache - uses: mamba-org/setup-micromamba@v1 + uses: mamba-org/setup-micromamba@v2 with: - micromamba-version: "latest" environment-name: uxarray_build environment-file: ci/environment.yml - create-args: >- - python=${{ matrix.python-version }} + create-args: python=${{ matrix.python-version }} init-shell: bash - architecture: ${{ env.MM_ARCH }} cache-downloads: true cache-environment: true - cache-environment-key: >- - ${{ runner.os }}-py${{ matrix.python-version }}-${{ hashFiles('ci/environment.yml') }} + cache-environment-key: ${{ runner.os }}-py${{ matrix.python-version }}-${{ hashFiles('ci/environment.yml') }} - name: Cache Numba cache uses: actions/cache@v4 @@ -90,7 +78,7 @@ jobs: sys.exit(rc) PY - - name: Run Coverage Tests (timed + durations) + - name: Run Coverage Tests (timed + durations) — nightly only if: github.event_name == 'schedule' env: NUMBA_DISABLE_JIT: 1 From bc9008e1d760fcfccb40ea2f1df1f8f2872cd762 Mon Sep 17 00:00:00 2001 From: Philip Chmielowiec Date: Wed, 13 Aug 2025 08:40:57 -0600 Subject: [PATCH 12/14] update CI --- .github/workflows/ci.yml | 49 +++++++--------------------------------- 1 file changed, 8 insertions(+), 41 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 18b9742df..23a344afc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,16 +6,19 @@ on: schedule: - cron: '0 0 * * *' # Daily at 00:00 UTC -# Avoid duplicate work; cancel in-progress runs for the same ref (except main) +permissions: + contents: read + concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} jobs: test: + # if: | + # github.repository == 'UXARRAY/uxarray' name: Python (${{ matrix.python-version }}, ${{ matrix.os }}) runs-on: ${{ matrix.os }} - timeout-minutes: 90 defaults: run: shell: bash -l {0} @@ -42,13 +45,13 @@ jobs: init-shell: bash cache-downloads: true cache-environment: true - cache-environment-key: ${{ runner.os }}-py${{ matrix.python-version }}-${{ hashFiles('ci/environment.yml') }} + cache-environment-key: ${{ github.repository }}-${{ runner.os }}-py${{ matrix.python-version }}-${{ hashFiles('ci/environment.yml') }} - name: Cache Numba cache uses: actions/cache@v4 with: path: ${{ env.NUMBA_CACHE_DIR }} - key: numba-${{ runner.os }}-py${{ matrix.python-version }}-${{ hashFiles('uxarray/**/*.py') }} + key: ${{ github.repository }}-numba-${{ runner.os }}-py${{ matrix.python-version }}-${{ hashFiles('uxarray/**/*.py') }} - name: Show conda info run: | @@ -78,28 +81,6 @@ jobs: sys.exit(rc) PY - - name: Run Coverage Tests (timed + durations) — nightly only - if: github.event_name == 'schedule' - env: - NUMBA_DISABLE_JIT: 1 - run: | - micromamba run -n uxarray_build python - <<'PY' - import subprocess, sys, time - cmd = [sys.executable, "-m", "pytest", "test", "-v", - "--cov=./uxarray", "--cov-report=xml", "--durations=0"] - t0 = time.time() - p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, text=True) - with open("pytest_durations_cov.txt", "w", encoding="utf-8") as f: - for line in p.stdout: - print(line, end="") - f.write(line) - rc = p.wait() - dt = time.time() - t0 - with open("total_time_cov.txt", "w", encoding="utf-8") as f: - f.write(f"{dt:.3f} seconds") - sys.exit(rc) - PY - - name: Add timing summary if: always() run: | @@ -121,7 +102,6 @@ jobs: echo "" >> "$GITHUB_STEP_SUMMARY" - name: Upload timing logs - if: always() uses: actions/upload-artifact@v4 with: name: timings-${{ matrix.os }}-py${{ matrix.python-version }} @@ -130,17 +110,4 @@ jobs: total_time_ns.txt pytest_durations_cov.txt total_time_cov.txt - - - name: Upload code coverage to Codecov (nightly only) - if: github.event_name == 'schedule' && github.repository == 'UXARRAY/uxarray' - uses: codecov/codecov-action@v5.4.3 - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} - OS: ${{ matrix.os }} - PYTHON: ${{ matrix.python-version }} - with: - file: ./coverage.xml - flags: unittests - env_vars: OS,PYTHON - name: codecov-umbrella - fail_ci_if_error: false + retention-days: 14 From 873a4c6865ad686d34937726e82076f9a4752364 Mon Sep 17 00:00:00 2001 From: Philip Chmielowiec Date: Wed, 13 Aug 2025 08:45:49 -0600 Subject: [PATCH 13/14] update CI --- .github/workflows/ci.yml | 115 ++++++++++++--------------------------- 1 file changed, 35 insertions(+), 80 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 23a344afc..6c6c5517a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,17 +1,9 @@ name: CI - on: pull_request: workflow_dispatch: schedule: - - cron: '0 0 * * *' # Daily at 00:00 UTC - -permissions: - contents: read - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} + - cron: '0 0 * * *' # Daily “At 00:00” jobs: test: @@ -26,88 +18,51 @@ jobs: strategy: fail-fast: false matrix: - os: ["ubuntu-latest", "macos-latest", "windows-latest"] - python-version: ["3.10", "3.11", "3.12", "3.13"] - - env: - NUMBA_CACHE_DIR: ${{ runner.temp }}/numba_cache - + os: [ "ubuntu-latest", "macos-latest", "macos-14", "windows-latest"] + python-version: [ "3.10", "3.11", "3.12", "3.13"] steps: - - name: Checkout + - name: Cancel previous runs + uses: styfle/cancel-workflow-action@0.12.1 + with: + access_token: ${{ github.token }} + + - name: checkout uses: actions/checkout@v5 + with: + token: ${{ github.token }} - - name: Setup micromamba + env cache - uses: mamba-org/setup-micromamba@v2 + - name: conda_setup (x64) + uses: conda-incubator/setup-miniconda@v3 + if: matrix.os != 'macos-14' with: - environment-name: uxarray_build + activate-environment: uxarray_build + channel-priority: strict + python-version: ${{ matrix.python-version }} + channels: conda-forge environment-file: ci/environment.yml - create-args: python=${{ matrix.python-version }} - init-shell: bash - cache-downloads: true - cache-environment: true - cache-environment-key: ${{ github.repository }}-${{ runner.os }}-py${{ matrix.python-version }}-${{ hashFiles('ci/environment.yml') }} + miniforge-variant: Miniforge3 + miniforge-version: latest - - name: Cache Numba cache - uses: actions/cache@v4 + - name: conda_setup (ARM64) + uses: conda-incubator/setup-miniconda@v3 + if: matrix.os == 'macos-14' with: - path: ${{ env.NUMBA_CACHE_DIR }} - key: ${{ github.repository }}-numba-${{ runner.os }}-py${{ matrix.python-version }}-${{ hashFiles('uxarray/**/*.py') }} + activate-environment: uxarray_build + channel-priority: strict + python-version: ${{ matrix.python-version }} + channels: conda-forge + environment-file: ci/environment.yml + installer-url: https://github.com/conda-forge/miniforge/releases/download/23.11.0-0/Miniforge3-23.11.0-0-MacOSX-arm64.sh - - name: Show conda info + - name: Install uxarray run: | - micromamba info - micromamba env list - micromamba run -n uxarray_build python -V + python -m pip install . --no-deps - - name: Install uxarray (no deps) + - name: conda list run: | - micromamba run -n uxarray_build python -m pip install . --no-deps + conda list - - name: Run Namespace Tests (timed + durations) - run: | - micromamba run -n uxarray_build python - <<'PY' - import subprocess, sys, time - cmd = [sys.executable, "-m", "pytest", "test", "-q", "--durations=0"] - t0 = time.time() - p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, text=True) - with open("pytest_durations_ns.txt", "w", encoding="utf-8") as f: - for line in p.stdout: - print(line, end="") - f.write(line) - rc = p.wait() - dt = time.time() - t0 - with open("total_time_ns.txt", "w", encoding="utf-8") as f: - f.write(f"{dt:.3f} seconds") - sys.exit(rc) - PY - - name: Add timing summary - if: always() + - name: Run Namespace Tests run: | - echo "## Test Timing Summary" >> "$GITHUB_STEP_SUMMARY" - echo "" >> "$GITHUB_STEP_SUMMARY" - echo "- **Namespace tests total**: \`$(cat total_time_ns.txt 2>/dev/null || echo N/A)\`" >> "$GITHUB_STEP_SUMMARY" - echo "- **Coverage tests total**: \`$(cat total_time_cov.txt 2>/dev/null || echo N/A)\`" >> "$GITHUB_STEP_SUMMARY" - echo "" >> "$GITHUB_STEP_SUMMARY" - echo "
Namespace: pytest --durations=0" >> "$GITHUB_STEP_SUMMARY" - echo "" >> "$GITHUB_STEP_SUMMARY" - sed 's/^/ /' pytest_durations_ns.txt >> "$GITHUB_STEP_SUMMARY" || true - echo "" >> "$GITHUB_STEP_SUMMARY" - echo "
" >> "$GITHUB_STEP_SUMMARY" - echo "" >> "$GITHUB_STEP_SUMMARY" - echo "
Coverage: pytest --durations=0" >> "$GITHUB_STEP_SUMMARY" - echo "" >> "$GITHUB_STEP_SUMMARY" - sed 's/^/ /' pytest_durations_cov.txt >> "$GITHUB_STEP_SUMMARY" || true - echo "" >> "$GITHUB_STEP_SUMMARY" - echo "
" >> "$GITHUB_STEP_SUMMARY" - - - name: Upload timing logs - uses: actions/upload-artifact@v4 - with: - name: timings-${{ matrix.os }}-py${{ matrix.python-version }} - path: | - pytest_durations_ns.txt - total_time_ns.txt - pytest_durations_cov.txt - total_time_cov.txt - retention-days: 14 + python -m pytest test From 9ab8994f94bc01448a055c29baa25507bde59c43 Mon Sep 17 00:00:00 2001 From: Philip Chmielowiec Date: Wed, 13 Aug 2025 08:50:42 -0600 Subject: [PATCH 14/14] only use macos-latest --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6c6c5517a..e9317c7a6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,7 +18,7 @@ jobs: strategy: fail-fast: false matrix: - os: [ "ubuntu-latest", "macos-latest", "macos-14", "windows-latest"] + os: [ "ubuntu-latest", "macos-latest", "windows-latest"] python-version: [ "3.10", "3.11", "3.12", "3.13"] steps: - name: Cancel previous runs