|
6 | 6 | pull_request:
|
7 | 7 | branches:
|
8 | 8 | - main
|
| 9 | + types: [opened, reopened, synchronize, labeled] |
9 | 10 | schedule:
|
10 | 11 | - cron: "0 0 * * *" # Daily “At 00:00” UTC
|
11 | 12 | workflow_dispatch: # allows you to trigger the workflow run manually
|
|
41 | 42 | && (
|
42 | 43 | (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch')
|
43 | 44 | || needs.detect-ci-trigger.outputs.triggered == 'true'
|
| 45 | + || contains( github.event.pull_request.labels.*.name, 'run-upstream') |
44 | 46 | )
|
45 | 47 | defaults:
|
46 | 48 | run:
|
|
92 | 94 | uses: xarray-contrib/issue-from-pytest-log@v1
|
93 | 95 | with:
|
94 | 96 | log-path: output-${{ matrix.python-version }}-log.jsonl
|
| 97 | + |
| 98 | + mypy-upstream-dev: |
| 99 | + name: mypy-upstream-dev |
| 100 | + runs-on: ubuntu-latest |
| 101 | + needs: detect-ci-trigger |
| 102 | + if: | |
| 103 | + always() |
| 104 | + && ( |
| 105 | + contains( github.event.pull_request.labels.*.name, 'run-upstream') |
| 106 | + ) |
| 107 | + defaults: |
| 108 | + run: |
| 109 | + shell: bash -l {0} |
| 110 | + strategy: |
| 111 | + fail-fast: false |
| 112 | + matrix: |
| 113 | + python-version: ["3.10"] |
| 114 | + steps: |
| 115 | + - uses: actions/checkout@v3 |
| 116 | + with: |
| 117 | + fetch-depth: 0 # Fetch all history for all branches and tags. |
| 118 | + - name: Set up conda environment |
| 119 | + uses: mamba-org/provision-with-micromamba@v15 |
| 120 | + with: |
| 121 | + environment-file: ci/requirements/environment.yml |
| 122 | + environment-name: xarray-tests |
| 123 | + extra-specs: | |
| 124 | + python=${{ matrix.python-version }} |
| 125 | + pytest-reportlog |
| 126 | + conda |
| 127 | + - name: Install upstream versions |
| 128 | + run: | |
| 129 | + bash ci/install-upstream-wheels.sh |
| 130 | + - name: Install xarray |
| 131 | + run: | |
| 132 | + python -m pip install --no-deps -e . |
| 133 | + - name: Version info |
| 134 | + run: | |
| 135 | + conda info -a |
| 136 | + conda list |
| 137 | + python xarray/util/print_versions.py |
| 138 | + - name: Install mypy |
| 139 | + run: | |
| 140 | + python -m pip install mypy --force-reinstall |
| 141 | + - name: Run mypy |
| 142 | + run: | |
| 143 | + python -m mypy --install-types --non-interactive --cobertura-xml-report mypy_report |
| 144 | + - name: Upload mypy coverage to Codecov |
| 145 | + uses: codecov/codecov-action@v3.1.3 |
| 146 | + with: |
| 147 | + file: mypy_report/cobertura.xml |
| 148 | + flags: mypy |
| 149 | + env_vars: PYTHON_VERSION |
| 150 | + name: codecov-umbrella |
| 151 | + fail_ci_if_error: false |
0 commit comments