Skip to content

Commit

Permalink
dldldlhs
Browse files Browse the repository at this point in the history
  • Loading branch information
paulbkoch committed Jul 27, 2024
1 parent 6f48228 commit 6aa4985
Showing 1 changed file with 33 additions and 27 deletions.
60 changes: 33 additions & 27 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -495,31 +495,37 @@ jobs:
find shared/libebm \( -iname "*.cpp" -o -iname "*.h" -o -iname "*.hpp" \) | xargs clang-format-16 -i -style=file
git diff --exit-code
format_black:
runs-on: ubuntu-latest
steps:
- name: Check out repo
uses: actions/checkout@v4
- name: Check python matches black format
continue-on-error: true
run: |
cd python/interpret-core
python -m pip install --upgrade black
black --check .
- name: Mark step with a warning
if: steps.black_check.outputs.exitcode != '0'
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',
head_sha: context.sha,
status: 'completed',
conclusion: 'neutral',
output: {
title: 'Warning',
summary: 'The previous step failed but the workflow continued.'
}
format_black:
runs-on: ubuntu-latest
steps:
- 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.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',
head_sha: context.sha,
status: 'completed',
conclusion: 'neutral',
output: {
title: 'Warning',
summary: 'The previous step failed but the workflow continued.'
}
})

0 comments on commit 6aa4985

Please sign in to comment.