Skip to content

Commit c60dee3

Browse files
authored
Update upstream-dev CI (#210)
* Update upstream-dev CI * to-revert * Fix * Revert "to-revert" This reverts commit 3bf826a.
1 parent 9aa6e88 commit c60dee3

File tree

2 files changed

+62
-19
lines changed

2 files changed

+62
-19
lines changed

.github/workflows/ci.yaml

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -99,25 +99,6 @@ jobs:
9999
name: codecov-umbrella
100100
fail_ci_if_error: false
101101

102-
upstream-dev:
103-
name: upstream-dev
104-
runs-on: ubuntu-latest
105-
defaults:
106-
run:
107-
shell: bash -l {0}
108-
steps:
109-
- uses: actions/checkout@v3
110-
- name: Set up conda environment
111-
uses: mamba-org/provision-with-micromamba@v14
112-
with:
113-
environment-file: ci/upstream-dev-env.yml
114-
environment-name: flox-tests
115-
extra-specs: |
116-
python="3.10"
117-
- name: Run Tests
118-
run: |
119-
pytest -n 2
120-
121102
xarray-groupby:
122103
name: xarray-groupby
123104
runs-on: ubuntu-latest
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: CI Upstream
2+
on:
3+
push:
4+
branches:
5+
- main
6+
pull_request:
7+
types: [opened, reopened, synchronize, labeled]
8+
branches:
9+
- main
10+
schedule:
11+
- cron: "0 0 * * *" # Daily “At 00:00” UTC
12+
workflow_dispatch: # allows you to trigger the workflow run manually
13+
14+
concurrency:
15+
group: ${{ github.workflow }}-${{ github.ref }}
16+
cancel-in-progress: true
17+
18+
jobs:
19+
upstream-dev:
20+
name: upstream-dev
21+
runs-on: ubuntu-latest
22+
if: ${{ contains( github.event.pull_request.labels.*.name, 'test-upstream') && github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' }}
23+
defaults:
24+
run:
25+
shell: bash -l {0}
26+
strategy:
27+
fail-fast: false
28+
matrix:
29+
python-version: ["3.10"]
30+
steps:
31+
- uses: actions/checkout@v3
32+
with:
33+
fetch-depth: 0 # Fetch all history for all branches and tags.
34+
- name: Set environment variables
35+
run: |
36+
echo "PYTHON_VERSION=${{ matrix.python-version }}" >> $GITHUB_ENV
37+
- name: Set up conda environment
38+
uses: mamba-org/provision-with-micromamba@v14
39+
with:
40+
environment-file: ci/upstream-dev-env.yml
41+
environment-name: flox-tests
42+
extra-specs: |
43+
python="${{ matrix.python-version }}"
44+
pytest-reportlog
45+
- name: Install flox
46+
run: |
47+
python -m pip install --no-deps -e .
48+
- name: Run Tests
49+
if: success()
50+
id: status
51+
run: |
52+
pytest -rf -n auto --cov=./ --cov-report=xml \
53+
--report-log output-${{ matrix.python-version }}-log.jsonl
54+
- name: Generate and publish the report
55+
if: |
56+
failure()
57+
&& steps.status.outcome == 'failure'
58+
&& github.event_name == 'schedule'
59+
&& github.repository_owner == 'xarray-contrib'
60+
uses: xarray-contrib/issue-from-pytest-log@v1
61+
with:
62+
log-path: output-${{ matrix.python-version }}-log.jsonl

0 commit comments

Comments
 (0)