Skip to content

Bump ruff from 0.3.7 to 0.4.10 #47

Bump ruff from 0.3.7 to 0.4.10

Bump ruff from 0.3.7 to 0.4.10 #47

Workflow file for this run

name: complexity
on:
pull_request:
jobs:
evaluate-complexity:
name: wily check
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.ref }}
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install Wily
run: pip install 'wily>=1.25.0'
- name: Build cache and diff
id: wily
run: |
wily build ruff_sync.py tasks.py tests/
DIFF=$(wily diff ruff_sync.py tasks.py tests/ --no-detail -r origin/${{ github.event.pull_request.base.ref }})
echo "$DIFF"
# Build multine output
DIFF="${DIFF//'%'/'%25'}"
DIFF="${DIFF//$'\n'/'%0A'}"
DIFF="${DIFF//$'\r'/'%0D'}"
echo "::set-output name=diff::$DIFF"
- name: Find current PR
uses: jwalton/gh-find-current-pr@v1
id: findPr
- name: Add Wily PR Comment
uses: marocchino/sticky-pull-request-comment@v2
if: steps.findPr.outputs.number && steps.wily.outputs.diff != ''
with:
recreate: true
number: ${{ steps.findPr.outputs.number }}
message: |
```
${{ steps.wily.outputs.diff }}
```
- name: Add Wily PR Comment
uses: marocchino/sticky-pull-request-comment@v2
if: steps.findPr.outputs.number && steps.wily.outputs.diff == ''
with:
recreate: true
number: ${{ steps.findPr.outputs.number }}
message: |
```
Wily: No changes in complexity detected.
```