-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Amend upstream-dev GitHub action + Bug fixes #4604
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 13 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
12cadb7
Set artifcats availability status
andersy005 bbbc63f
Fix bug during issue creation/update
andersy005 c4c762d
write if condition on multiple lines
andersy005 d21f8be
Merge branch 'master' of github.com:pydata/xarray into bugfix/upstrea…
andersy005 bc7c531
Merge branch 'master' of github.com:pydata/xarray into bugfix/upstrea…
andersy005 4fc826f
Merge branch 'master' of github.com:pydata/xarray into bugfix/upstrea…
andersy005 0f3254e
Merge branch 'master' of github.com:pydata/xarray into bugfix/upstrea…
andersy005 f29ff38
Merge branch 'master' of github.com:pydata/xarray into bugfix/upstrea…
andersy005 cacd4ab
Merge branch 'master' of github.com:pydata/xarray into bugfix/upstrea…
andersy005 7fd0b52
Enforce channel priority. Thank you, @mathause
andersy005 df9ea23
Set channel priority to `strict`
andersy005 2aa0f88
multi-line conditional expressions
andersy005 624685c
Remove unnecessary step per @keewis recommendation
andersy005 e7219c1
Update .github/workflows/upstream-dev-ci.yaml
keewis File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,6 +21,8 @@ jobs: | |
fail-fast: false | ||
matrix: | ||
python-version: ["3.8"] | ||
outputs: | ||
artifacts_availability: ${{ steps.status.outputs.ARTIFACTS_AVAILABLE }} | ||
steps: | ||
- name: Cancel previous runs | ||
uses: styfle/[email protected] | ||
|
@@ -30,6 +32,7 @@ jobs: | |
- uses: conda-incubator/setup-miniconda@v2 | ||
with: | ||
channels: conda-forge | ||
channel-priority: strict | ||
mamba-version: "*" | ||
activate-environment: xarray-tests | ||
auto-update-conda: false | ||
|
@@ -40,12 +43,17 @@ jobs: | |
bash ci/install-upstream-wheels.sh | ||
conda list | ||
- name: Run Tests | ||
id: status | ||
run: | | ||
set -o pipefail | ||
python -m pytest -rf | tee output-${{ matrix.python-version }}-log | ||
|
||
set -euo pipefail | ||
python -m pytest -rf | tee output-${{ matrix.python-version }}-log || ( | ||
echo '::set-output name=ARTIFACTS_AVAILABLE::true' && false | ||
) | ||
- name: Upload artifacts | ||
if: "failure()&&(github.event_name == 'schedule')&&(github.repository == 'pydata/xarray')" # Check the exit code of previous step | ||
if: | | ||
failure() | ||
&& github.event_name == 'schedule' | ||
&& github.repository == 'pydata/xarray' | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: output-${{ matrix.python-version }}-log | ||
|
@@ -55,7 +63,11 @@ jobs: | |
report: | ||
name: report | ||
needs: upstream-dev | ||
if: "always()&&(github.event_name == 'schedule')&&(github.repository == 'pydata/xarray')" | ||
if: | | ||
always() | ||
&& github.event_name == 'schedule' | ||
&& github.repository == 'pydata/xarray' | ||
&& needs.upstream-dev.outputs.artifacts_availability =='true' | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
|
@@ -86,7 +98,7 @@ jobs: | |
const title = "⚠️ Nightly upstream-dev CI failed ⚠️" | ||
const workflow_url = `https://github.com/${process.env.GITHUB_REPOSITORY}/actions/runs/${process.env.GITHUB_RUN_ID}` | ||
const issue_body = `[Workflow Run URL](${workflow_url})\n${pytest_logs}` | ||
|
||
// Run GraphQL query against GitHub API to find the most recent open issue used for reporting failures | ||
const query = `query($owner:String!, $name:String!, $creator:String!, $label:String!){ | ||
repository(owner: $owner, name: $name) { | ||
|
@@ -109,11 +121,10 @@ jobs: | |
creator: "github-actions[bot]" | ||
} | ||
const result = await github.graphql(query, variables) | ||
const issue_info = result.repository.issues.edges[0].node | ||
|
||
// If no issue is open, create a new issue, else update the | ||
// body of the existing issue. | ||
if (typeof issue_info.number === 'undefined') { | ||
// If no issue is open, create a new issue, | ||
// else update the body of the existing issue. | ||
if (result.repository.issues.edges.length === 0) { | ||
github.issues.create({ | ||
owner: variables.owner, | ||
repo: variables.name, | ||
|
@@ -125,7 +136,7 @@ jobs: | |
github.issues.update({ | ||
owner: variables.owner, | ||
repo: variables.name, | ||
issue_number: issue_info.number, | ||
issue_number: result.repository.issues.edges[0].node.number, | ||
body: issue_body | ||
}) | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.