CI #7157
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
| name: CI | |
| on: | |
| pull_request: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: '0 0 * * *' # Daily “At 00:00” | |
| jobs: | |
| test: | |
| # if: | | |
| # github.repository == 'UXARRAY/uxarray' | |
| 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", "windows-latest"] | |
| python-version: [ "3.11", "3.12", "3.13"] | |
| steps: | |
| - name: Cancel previous runs | |
| uses: styfle/[email protected] | |
| with: | |
| access_token: ${{ github.token }} | |
| - name: checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| token: ${{ github.token }} | |
| - name: conda_setup (x64) | |
| uses: conda-incubator/setup-miniconda@v3 | |
| if: matrix.os != 'macos-14' | |
| 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) | |
| uses: conda-incubator/setup-miniconda@v3 | |
| if: matrix.os == 'macos-14' | |
| 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 | |
| - name: Run Namespace Tests | |
| run: | | |
| python -m pytest test | |
| link-check: | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| shell: bash -l {0} | |
| steps: | |
| - name: checkout | |
| uses: actions/checkout@v6 | |
| - name: environment setup | |
| id: link-env-setup | |
| continue-on-error: true | |
| uses: mamba-org/setup-micromamba@0dea6379afdaffa5d528b3d1dabc45da37f443fc # v2 | |
| with: | |
| environment-file: ci/docs.yml | |
| cache-environment: true | |
| cache-environment-key: "linkcheck-${{env.TODAY}}" | |
| create-args: >- | |
| python=3.11 | |
| - name: retry environment set up if failed | |
| if: steps.link-env-setup.outcome == 'failure' | |
| uses: mamba-org/setup-micromamba@0dea6379afdaffa5d528b3d1dabc45da37f443fc # v2 | |
| with: | |
| download-micromamba: false | |
| environment-file: ci/docs.yml | |
| cache-environment: true | |
| cache-environment-key: "linkcheck-${{env.TODAY}}" | |
| create-args: >- | |
| python=3.11 | |
| - name: Install uxarray | |
| run: | | |
| python -m pip install . --no-deps | |
| - name: conda list | |
| run: | | |
| conda list | |
| - name: Make docs with linkcheck | |
| uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3 | |
| with: | |
| timeout_minutes: 20 | |
| max_attempts: 3 | |
| command: | | |
| eval "$(micromamba shell hook --shell bash)" | |
| micromamba activate uxarray-docs | |
| cd docs | |
| make linkcheck |