Add label parameter to xarray_beam.Dataset methods.
#802
Workflow file for this run
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: | |
| # Triggers the workflow on push or pull request events but only for the main branch | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| # Allows you to run this workflow manually from the Actions tab | |
| workflow_dispatch: | |
| jobs: | |
| pytest-job: | |
| name: "python ${{ matrix.python-version }}" | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.11", "3.12", "3.13"] | |
| steps: | |
| - name: Cancel previous | |
| uses: styfle/[email protected] | |
| with: | |
| access_token: ${{ github.token }} | |
| if: ${{github.ref != 'refs/head/main'}} | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install Xarray-Beam | |
| run: | | |
| pip install -e .[tests] | |
| - name: Run unit tests | |
| # TODO(shoyer): remove the pangeo-forge module? the tests no longer pass | |
| run: | | |
| pytest xarray_beam | |
| - name: Run example tests | |
| # The examples define some of the same flags, so we run pytest in separate processes. | |
| run: | | |
| pytest examples/era5_climatology_test.py | |
| pytest examples/xbeam_rechunk_test.py | |
| # Auto-publish when version is increased | |
| publish-job: | |
| # Only try to publish if: | |
| # * Repo is self (prevents running from forks) | |
| # * Branch is `main` | |
| if: | | |
| github.repository == 'google/xarray-beam' | |
| && github.ref == 'refs/heads/main' | |
| needs: pytest-job # Only publish after tests are successful | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| timeout-minutes: 30 | |
| steps: | |
| # Publish the package (if local `__version__` > pip version) | |
| - uses: etils-actions/pypi-auto-publish@v1 | |
| with: | |
| pypi-token: ${{ secrets.PYPI_API_TOKEN }} | |
| gh-token: ${{ secrets.GITHUB_TOKEN }} | |
| parse-changelog: false |