Debian Codegraph @

.github/workflows/upstream.yml

raw
1 name: Upstream
2
3 on:
4 schedule:
5 - cron: "0 1 * * *"
6 push:
7 pull_request:
8 workflow_dispatch:
9
10 # Required shell entrypoint to have properly activated conda environments
11 defaults:
12 run:
13 shell: bash -l {0}
14
15 jobs:
16
17 check:
18 runs-on: ubuntu-latest
19 if: github.event_name == 'push' || github.event_name == 'pull_request'
20 outputs:
21 test-upstream: ${{ steps.detect-trigger.outputs.trigger-found }}
22 steps:
23 - uses: actions/[email protected]
24 with:
25 fetch-depth: 2
26 - uses: xarray-contrib/ci-trigger@v1
27 id: detect-trigger
28 with:
29 keyword: "test-upstream"
30
31 build:
32 needs: check
33 runs-on: ubuntu-latest
34 if: |
35 always()
36 && (
37 needs.check.outputs.test-upstream == 'true'
38 || (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'upstream'))
39 || (github.repository == 'dask/dask' && github.event_name != 'pull_request')
40 )
41 timeout-minutes: 90
42
43 env:
44 COVERAGE: "true"
45 PARALLEL: "true"
46 UPSTREAM_DEV: 1
47
48 steps:
49 - name: Checkout source
50 uses: actions/[email protected]
51
52 - name: Setup Conda Environment
53 uses: conda-incubator/[email protected]
54 with:
55 miniforge-version: latest
56 use-mamba: true
57 channel-priority: strict
58 environment-file: continuous_integration/environment-3.12.yaml
59 activate-environment: test-environment
60 auto-activate-base: false
61
62 - name: Reconfigure pytest-timeout
63 # No SIGALRM available on Windows
64 if: ${{ matrix.os != 'windows-latest' }}
65 run: sed -i.bak 's/timeout_method = "thread"/timeout_method = "signal"/' pyproject.toml
66
67 - name: Install
68 run: source continuous_integration/scripts/install.sh
69
70 - name: Run tests
71 id: run_tests
72 env:
73 XTRATESTARGS: "--report-log output-log.jsonl"
74 run: source continuous_integration/scripts/run_tests.sh
75
76 - name: Open or update issue on failure
77 if: |
78 failure()
79 && github.event_name != 'pull_request'
80 && github.repository == 'dask/dask'
81 && steps.run_tests.outcome == 'failure'
82 uses: xarray-contrib/[email protected]
83 with:
84 log-path: output-log.jsonl
85 issue-title: ⚠️ Upstream CI failed ⚠️
86 issue-label: upstream
87
88 - name: Coverage
89 uses: codecov/codecov-action@v5