CI #928
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 | |
| schedule: | |
| - cron: "0 0 * * *" # Daily “At 00:00” | |
| workflow_dispatch: # allows you to trigger manually | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| name: ${{ matrix.os }}-${{ matrix.python-version }} | |
| if: github.repository == 'esgf2-us/intake-esgf' | |
| runs-on: ${{ matrix.os }}-latest | |
| timeout-minutes: 30 | |
| defaults: | |
| run: | |
| shell: bash -l {0} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.12", "3.13", "3.14"] | |
| os: [macos, ubuntu, windows] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install uv environment | |
| uses: astral-sh/setup-uv@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| run: uv python install ${{ matrix.python-version }} | |
| - name: Install intake-esgf and dependencies | |
| run: uv sync --group dev | |
| - name: Run pre-commit checks | |
| run: uv run --group dev pre-commit run -a | |
| - name: Run Tests | |
| run: uv run pytest | |
| - name: Upload code coverage to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| files: ./coverage.xml | |
| flags: unittests | |
| env_vars: OS,PYTHON | |
| name: codecov-umbrella | |
| fail_ci_if_error: true | |
| token: ${{ secrets.CODECOV_TOKEN }} |