release 0.4.0 (#189) #486
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: | |
| push: | |
| branches: ["main"] | |
| pull_request: | |
| branches: ["main"] | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| FORCE_COLOR: 3 | |
| jobs: | |
| detect-ci-trigger: | |
| name: detect ci trigger | |
| runs-on: ubuntu-latest | |
| if: | | |
| github.repository_owner == 'xarray-contrib' | |
| && (github.event_name == 'pull_request' || github.event_name == 'push') | |
| outputs: | |
| triggered: ${{ steps.detect-trigger.outputs.trigger-found }} | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 2 | |
| - uses: xarray-contrib/ci-trigger@v1 | |
| id: detect-trigger | |
| with: | |
| keyword: "[skip-ci]" | |
| tests: | |
| name: ${{ matrix.os }} ${{ matrix.env }} | |
| runs-on: ${{ matrix.os }} | |
| needs: detect-ci-trigger | |
| if: needs.detect-ci-trigger.outputs.triggered == 'false' | |
| defaults: | |
| run: | |
| shell: bash -l {0} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: ["ubuntu-latest", "macos-latest", "windows-latest"] | |
| env: ["ci-py311", "ci-py312", "ci-py313"] | |
| steps: | |
| - name: Clone repository | |
| uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 # Fetch all history for all branches and tags | |
| - name: setup environment | |
| uses: prefix-dev/setup-pixi@28eb668aafebd9dede9d97c4ba1cd9989a4d0004 # 0.9.2 | |
| with: | |
| environments: "${{ matrix.env }}" | |
| - name: investigate env variables | |
| run: | | |
| echo PYTHON_VERSION=$(pixi run -e ${{ matrix.env }} python -c 'import sys; print(".".join(map(str, sys.version_info[:2])))') >> $GITHUB_ENV | |
| echo RUNNER_OS="${{ matrix.os }}" | |
| - name: Import xdggs | |
| run: | | |
| pixi run -e ${{ matrix.env }} python -c "import xdggs" | |
| - name: run tests | |
| if: success() | |
| id: status | |
| run: | | |
| pixi run -e ${{ matrix.env }} tests --cov=xdggs |