Bump astral-sh/setup-uv from 6 to 7 in the actions group (#69) #322
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # SPDX-FileCopyrightText: © 2022 the SimWeights contributors | |
| # | |
| # SPDX-License-Identifier: BSD-2-Clause | |
| name: Tests | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| Tests: | |
| env: | |
| UV_SYSTEM_PYTHON: 1 | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.10", "3.11", "3.12", "3.13"] | |
| os: [ubuntu-24.04] | |
| include: | |
| - python-version: "3.13" | |
| os: macos-13 | |
| - python-version: "3.13" | |
| os: macos-14 | |
| - python-version: "3.13" | |
| os: macos-15 | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install uv and set the python version | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| enable-cache: true | |
| - name: Install SimWeights | |
| run: uv pip install -e .[test] | |
| - name: Download Test Data | |
| run: | | |
| curl -u icecube:${{ secrets.ICECUBE_PASSWORD }} https://convey.icecube.wisc.edu/data/ana/Software/simweights/test-data/simweights_testdata.tar.gz -O | |
| tar xzvf simweights_testdata.tar.gz | |
| - name: Run Tests | |
| env: | |
| SIMWEIGHTS_TESTDATA: . | |
| run: python3 -m pytest --cov-report=xml --junit-xml=test-results-${{matrix.os}}-${{matrix.python-version}}.junit.xml | |
| - name: Upload Test Results | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| if-no-files-found: error | |
| name: test-results-${{matrix.os}}-${{matrix.python-version}} | |
| path: test-results-${{matrix.os}}-${{matrix.python-version}}.junit.xml | |
| - name: Upload Coverage to Codecov | |
| if: ${{ !github.event.act }} | |
| uses: codecov/codecov-action@v5 | |
| env: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
| with: | |
| fail_ci_if_error: false | |
| verbose: true | |
| TestsIceTray: | |
| env: | |
| UV_SYSTEM_PYTHON: 1 | |
| runs-on: ubuntu-latest | |
| container: icecube/icetray:icetray-devel-current-ubuntu22.04-X64 | |
| strategy: | |
| fail-fast: false | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| enable-cache: true | |
| - name: Install SimWeights | |
| run: uv pip install -e .[test] | |
| - name: Download Test Data | |
| run: | | |
| curl -u icecube:${{ secrets.ICECUBE_PASSWORD }} https://convey.icecube.wisc.edu/data/ana/Software/simweights/test-data/simweights_testdata.tar.gz -O | |
| tar xzvf simweights_testdata.tar.gz | |
| - name: Run Unit Tests | |
| env: | |
| SIMWEIGHTS_TESTDATA: . | |
| run: /opt/icetray/bin/icetray-shell python -m pytest --junit-xml=test-results-icetray.junit.xml | |
| - name: Upload Test Results | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| if-no-files-found: error | |
| name: test-results-icetray.junit.xml | |
| path: test-results-icetray.junit.xml | |
| publish-test-results: | |
| name: "Publish Tests Results" | |
| needs: Tests | |
| runs-on: ubuntu-latest | |
| permissions: | |
| checks: write | |
| pull-requests: write | |
| contents: read | |
| if: always() | |
| steps: | |
| - name: Download Artifacts | |
| uses: actions/download-artifact@v5 | |
| with: | |
| path: . | |
| pattern: test-results-* | |
| merge-multiple: true | |
| - name: Publish Test Results | |
| uses: EnricoMi/publish-unit-test-result-action@v2 | |
| with: | |
| files: "*.xml" | |
| deduplicate_classes_by_file_name: true | |
| Docs: | |
| env: | |
| UV_SYSTEM_PYTHON: 1 | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.13" | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| enable-cache: true | |
| - name: Install dependencies | |
| run: | | |
| uv pip install .[docs] | |
| - name: Run Sphinx | |
| working-directory: ./docs | |
| run: make html | |
| - name: Upload docs to docs.icecube.aq | |
| if: ${{ github.ref_name == 'main' && !github.event.act }} | |
| working-directory: ./docs | |
| run: | | |
| tar -czvf simweights_docs.tar.gz -C_build/html . | |
| curl -XPUT -i --data-binary @simweights_docs.tar.gz https://docs.icecube.aq/api/upload?path=simweights/${{ github.ref_name }} -u icecube:${{ secrets.ICECUBE_PASSWORD }} |