Skip to content

Commit cd9031e

Browse files
broken nightly wheels ci and permissions for the nightly tests (#11282)
* remove the accidentally copied pypi publish step * separate test execution from issue creation * upload the artifact only if the tests failed * correct source of the log-file path * debug: print github output [skip-rtd] * typo [skip-rtd] * correct the path to the log file Co-authored-by: Nick Hodgskin <36369090+VeckoTheGecko@users.noreply.github.com> --------- Co-authored-by: Nick Hodgskin <36369090+VeckoTheGecko@users.noreply.github.com>
1 parent c877492 commit cd9031e

2 files changed

Lines changed: 34 additions & 10 deletions

File tree

.github/workflows/nightly-wheels.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,6 @@ jobs:
6666
with:
6767
name: releases
6868
path: dist
69-
- name: Publish package to PyPI
70-
uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # v1.14.0
71-
with:
72-
verbose: true
7369

7470
- name: Upload wheel
7571
id: upload

.github/workflows/upstream-dev-ci.yaml

Lines changed: 34 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ jobs:
7777
needs: cache-pixi-lock
7878
if: |
7979
always() && needs.cache-pixi-lock.result == 'success'
80+
8081
defaults:
8182
run:
8283
shell: bash -l {0}
@@ -85,8 +86,8 @@ jobs:
8586
matrix:
8687
pixi-env: ["test-nightly"]
8788

88-
permissions:
89-
issues: write
89+
outputs:
90+
log-file: ${{ steps.determine-log-path.outputs.log-file }}
9091

9192
steps:
9293
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
@@ -109,21 +110,48 @@ jobs:
109110
- name: Import xarray
110111
run: |
111112
pixi run -e ${{matrix.pixi-env}} -- python -c 'import xarray'
113+
- name: Determine log path
114+
id: determine-log-path
115+
run: |
116+
echo "log-file=output-${{ matrix.pixi-env }}-log.jsonl" >> $GITHUB_OUTPUT;
117+
cat $GITHUB_OUTPUT
112118
- name: Run Tests
113119
if: success()
114120
id: status
121+
env:
122+
LOG_PATH: ${{ steps.determine-log-path.output.log-file }}
115123
run: |
116124
pixi run -e ${{matrix.pixi-env}} -- python -m pytest --timeout=60 -rf -nauto \
117-
--report-log output-${{ matrix.pixi-env }}-log.jsonl
125+
--report-log "$LOG_PATH"
126+
- uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
127+
if: failure() && steps.status.outcome == 'failure'
128+
with:
129+
name: log file
130+
path: ${{ steps.determine-log-path.outputs.log-file }}
131+
132+
create-issue:
133+
needs: upstream-dev
134+
runs-on: ubuntu-slim
135+
if: |
136+
needs.upstream-dev.result == 'failure'
137+
&& github.event_name == 'schedule'
138+
&& github.repository_owner == 'pydata'
139+
140+
permissions:
141+
issues: write
142+
143+
steps:
144+
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
145+
with:
146+
name: log file
147+
path: logs/
118148
- name: Generate and publish the report
119149
if: |
120150
failure()
121151
&& steps.status.outcome == 'failure'
122-
&& github.event_name == 'schedule'
123-
&& github.repository_owner == 'pydata'
124152
uses: scientific-python/issue-from-pytest-log-action@8e905db353437cda1d6a773de245343fbfc940dd # v1.5.0
125153
with:
126-
log-path: output-${{ matrix.pixi-env }}-log.jsonl
154+
log-path: logs/${{ needs.upstream-dev.outputs.log-file }}
127155

128156
mypy-upstream-dev:
129157
name: mypy-upstream-dev

0 commit comments

Comments
 (0)