Skip to content

Commit

Permalink
warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
paulbkoch committed Jul 27, 2024
1 parent 4d7c386 commit 5043db4
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -501,25 +501,30 @@ jobs:
- name: Check out repo
uses: actions/checkout@v4
- name: Check python matches black format
id: black_check
continue-on-error: true
run: |
cd python/interpret-core
python -m pip install --upgrade black
black --check .
shell: bash
- name: Capture exit code
id: capture_exit_code
run: echo "::set-output name=exitcode::${{ steps.black_check.outcome == 'failure' }}"
- name: Mark step with a warning
#if: ${{ steps.black_check.outcome == 'failure' }}
if: steps.capture_exit_code.outputs.exitcode == 'true'
uses: actions/github-script@v6
with:
script: |
github.rest.checks.create({
owner: context.repo.owner,
repo: context.repo.repo,
name: 'Warning: Step might have failed',
name: 'Warning: Failed black formatting check',
head_sha: context.sha,
status: 'completed',
conclusion: 'neutral',
output: {
title: 'Warning',
summary: 'The previous step failed but the workflow continued.'
summary: 'Failed black formatting check.'
}
})

0 comments on commit 5043db4

Please sign in to comment.