Skip to content

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 14 commits into from
Dec 5, 2020
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 16 additions & 6 deletions .github/workflows/upstream-dev-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -43,6 +45,11 @@ jobs:
run: |
set -o pipefail
python -m pytest -rf | tee output-${{ matrix.python-version }}-log
- name: Set availability status of logs
if: failure()
run: |
echo '::set-output name=ARTIFACTS_AVAILABLE::true'
exit 1

- name: Upload artifacts
if: "failure()&&(github.event_name == 'schedule')&&(github.repository == 'pydata/xarray')" # Check the exit code of previous step
Expand All @@ -55,7 +62,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:
Expand Down Expand Up @@ -108,11 +119,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,
Expand All @@ -124,7 +134,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
})
}