A community-maintained Python framework for creating mathematical animations.
Use actions/checkout for cloning repository; black-checks (#1216)
Naveen M K56923348adef
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.ymlindex 619662f98..6a911e953 100644--- a/.github/workflows/lint.yml+++ b/.github/workflows/lint.yml@@ -12,29 +12,30 @@ jobs:uses: actions/setup-python@v2with:python-version: 3.8-- - name: Checkout the repository- shell: bash+ - name: Get Fetch Depth+ id: get-depth+ shell: pwshrun: |- prnum=$(python -c "import json;print(json.load(open(r'${GITHUB_EVENT_PATH}'))['number'])")- git init- git remote add origin https://github.com/ManimCommunity/manim.git- git fetch origin pull/${prnum}/head:pr-${prnum}- git checkout pr-${prnum}+ $payload = gc "$env:GITHUB_EVENT_PATH" | ConvertFrom-Json+ $commitEndpoint=$($payload.pull_request._links.commits.href)+ echo "$commitEndpoint"+ $commits = Invoke-WebRequest -Uri "$commitEndpoint" | ConvertFrom-Json+ echo "::set-output name=fetch-depth::$($commits.count)"+ - name: Checkout the repository+ uses: actions/checkout@v2+ with:+ fetch-depth: ${{ steps.get-depth.outputs.fetch-depth }}- name: Install blackrun: pip install black- name: Get filesid: files-changes-in-pr+ env:+ depth: ${{ steps.get-depth.outputs.fetch-depth }}shell: powershellrun: |- #echo "$(gc "$env:GITHUB_EVENT_PATH")"- $payload = gc "$env:GITHUB_EVENT_PATH" | ConvertFrom-Json- $commitEndpoint=$($payload.pull_request._links.commits.href)- echo "$commitEndpoint"- $commits = Invoke-WebRequest -Uri "$commitEndpoint" | ConvertFrom-Json- bash -c "git diff --name-only HEAD~$($commits.count) HEAD>/d/changes.txt"+ bash -c "git diff --name-only HEAD~$($depth) HEAD>/d/changes.txt"- name: Run Black on top of latest commitshell: bash