-
Notifications
You must be signed in to change notification settings - Fork 0
90 lines (77 loc) · 2.49 KB
/
upstream.yml
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
86
87
88
89
90
name: Upstream
on:
schedule:
- cron: "0 1 * * *"
push:
pull_request:
workflow_dispatch:
# Required shell entrypoint to have properly activated conda environments
defaults:
run:
shell: bash -l {0}
jobs:
check:
runs-on: ubuntu-latest
if: github.event_name == 'push' || github.event_name == 'pull_request'
outputs:
test-upstream: ${{ steps.detect-trigger.outputs.trigger-found }}
steps:
- uses: actions/[email protected]
with:
fetch-depth: 2
- uses: xarray-contrib/ci-trigger@v1
id: detect-trigger
with:
keyword: "test-upstream"
build:
needs: check
runs-on: ubuntu-latest
if: |
always()
&& (
needs.check.outputs.test-upstream == 'true'
|| (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'upstream'))
|| (github.repository == 'dask/dask' && github.event_name != 'pull_request')
)
timeout-minutes: 90
env:
COVERAGE: "true"
PARALLEL: "true"
UPSTREAM_DEV: 1
steps:
- name: Checkout source
uses: actions/[email protected]
- name: Setup Conda Environment
uses: conda-incubator/[email protected]
with:
miniforge-variant: Mambaforge
miniforge-version: latest
use-mamba: true
channel-priority: strict
environment-file: continuous_integration/environment-3.12.yaml
activate-environment: test-environment
auto-activate-base: false
- name: Reconfigure pytest-timeout
# No SIGALRM available on Windows
if: ${{ matrix.os != 'windows-latest' }}
run: sed -i.bak 's/timeout_method = "thread"/timeout_method = "signal"/' pyproject.toml
- name: Install
run: source continuous_integration/scripts/install.sh
- name: Run tests
id: run_tests
env:
XTRATESTARGS: "--report-log output-log.jsonl"
run: source continuous_integration/scripts/run_tests.sh
- name: Open or update issue on failure
if: |
failure()
&& github.event_name != 'pull_request'
&& github.repository == 'dask/dask'
&& steps.run_tests.outcome == 'failure'
uses: xarray-contrib/[email protected]
with:
log-path: output-log.jsonl
issue-title: ⚠️ Upstream CI failed ⚠️
issue-label: upstream
- name: Coverage
uses: codecov/codecov-action@v3