File: upstream-dev-ci.yaml

package info (click to toggle)
flox 0.11.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 3,884 kB
  • sloc: python: 8,581; makefile: 154
file content (85 lines) | stat: -rw-r--r-- 2,766 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
name: CI Upstream
on:
  push:
    branches:
      - main
  pull_request:
    types: [opened, reopened, synchronize, labeled]
    branches:
      - main
    paths:
      - ".github/workflows/upstream-dev-ci.yaml"
      - "ci/upstream-dev-env.yml"
      - "flox/*"
  schedule:
    - cron: "0 0 * * *" # Daily “At 00:00” UTC
  workflow_dispatch: # allows you to trigger the workflow run manually

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

jobs:
  upstream-dev:
    name: upstream-dev
    runs-on: ubuntu-latest
    if: ${{
      (contains(github.event.pull_request.labels.*.name, 'test-upstream') && github.event_name == 'pull_request')
      || github.event_name == 'workflow_dispatch'
      || github.event_name == 'schedule'
      }}
    strategy:
      fail-fast: false
      matrix:
        python-version: ["3.14"]
    steps:
      - uses: actions/checkout@v6
        with:
          fetch-depth: 0 # Fetch all history for all branches and tags.
      - name: Set environment variables
        run: |
          echo "PYTHON_VERSION=${{ matrix.python-version }}" >> $GITHUB_ENV
      - name: Set up Python and uv
        uses: astral-sh/setup-uv@v7
        with:
          python-version: ${{ matrix.python-version }}
          enable-cache: true
          cache-dependency-glob: "pyproject.toml"

      - name: Install upstream dev dependencies
        run: |
          # First sync the upstream group without the overridden packages
          uv sync --group upstream --no-dev

          # Install upstream development versions from nightly/git
          uv pip install \
            --extra-index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple \
            --pre \
            numpy scipy pandas xarray

          uv pip install \
            "dask[core] @ git+https://github.com/dask/dask" \
            "numpy-groupies @ git+https://github.com/ml31415/numpy-groupies" \
            "sparse @ git+https://github.com/pydata/sparse" \
            "cftime @ git+https://github.com/Unidata/cftime"


      - name: List deps
        run: |
          uv pip list
      - name: Run Tests
        if: success()
        id: status
        run: |
          uv run --no-dev pytest -rf -n auto --cov=./ --cov-report=xml \
            --report-log output-${{ matrix.python-version }}-log.jsonl \
             --hypothesis-profile ci
      - name: Generate and publish the report
        if: |
          failure()
          && steps.status.outcome == 'failure'
          && github.event_name == 'schedule'
          && github.repository_owner == 'xarray-contrib'
        uses: xarray-contrib/issue-from-pytest-log@v1
        with:
          log-path: output-${{ matrix.python-version }}-log.jsonl