fix: coverage run --parallel -> coverage run --parallel-mode #4636
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: pre-commit | |
on: [push, pull_request] | |
jobs: | |
pre-commit: | |
runs-on: ubuntu-latest | |
name: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/[email protected] | |
with: | |
python-version: "3.9" | |
- run: | | |
pip install --constraint=.github/workflows/constraints.txt pip | |
pip install --constraint=.github/workflows/constraints.txt pre-commit | |
- name: Compute cache key prefix | |
if: matrix.os != 'windows-latest' | |
id: cache_key_prefix | |
shell: python | |
run: | | |
import hashlib | |
import sys | |
python = "py{}.{}".format(*sys.version_info[:2]) | |
payload = sys.version.encode() + sys.executable.encode() | |
digest = hashlib.sha256(payload).hexdigest() | |
result = "${{ runner.os }}-{}-{}-pre-commit".format(python, digest) | |
print("::set-output name=result::{}".format(result)) | |
- uses: actions/cache@v3 | |
if: matrix.os != 'windows-latest' | |
with: | |
path: ~/.cache/pre-commit | |
key: ${{ steps.cache_key_prefix.outputs.result }}-${{ hashFiles('.pre-commit-config.yaml') }} | |
restore-keys: | | |
${{ steps.cache_key_prefix.outputs.result }}- | |
- run: pre-commit run --all-files --show-diff-on-failure --color=always |