-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/PyCQA/pylint into issue-4354
- Loading branch information
Showing
369 changed files
with
2,832 additions
and
1,982 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ on: | |
|
||
env: | ||
# Also change CACHE_VERSION in the other workflows | ||
CACHE_VERSION: 20 | ||
CACHE_VERSION: 23 | ||
DEFAULT_PYTHON: "3.10" | ||
|
||
jobs: | ||
|
@@ -24,7 +24,7 @@ jobs: | |
fetch-depth: 0 | ||
- name: Set up Python ${{ env.DEFAULT_PYTHON }} | ||
id: python | ||
uses: actions/setup-python@v4.1.0 | ||
uses: actions/setup-python@v4.2.0 | ||
with: | ||
python-version: ${{ env.DEFAULT_PYTHON }} | ||
- name: Generate partial Python venv restore key | ||
|
@@ -35,7 +35,7 @@ jobs: | |
}}" | ||
- name: Restore Python virtual environment | ||
id: cache-venv | ||
uses: actions/[email protected].5 | ||
uses: actions/[email protected].8 | ||
with: | ||
path: venv | ||
key: >- | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ on: | |
pull_request: ~ | ||
|
||
env: | ||
CACHE_VERSION: 20 | ||
CACHE_VERSION: 23 | ||
DEFAULT_PYTHON: "3.10" | ||
PRE_COMMIT_CACHE: ~/.cache/pre-commit | ||
|
||
|
@@ -29,7 +29,7 @@ jobs: | |
uses: actions/[email protected] | ||
- name: Set up Python ${{ env.DEFAULT_PYTHON }} | ||
id: python | ||
uses: actions/setup-python@v4.1.0 | ||
uses: actions/setup-python@v4.2.0 | ||
with: | ||
python-version: ${{ env.DEFAULT_PYTHON }} | ||
- name: Generate partial Python venv restore key | ||
|
@@ -40,7 +40,7 @@ jobs: | |
}}" | ||
- name: Restore Python virtual environment | ||
id: cache-venv | ||
uses: actions/[email protected].5 | ||
uses: actions/[email protected].8 | ||
with: | ||
path: venv | ||
key: >- | ||
|
@@ -63,7 +63,7 @@ jobs: | |
hashFiles('.pre-commit-config.yaml') }}" | ||
- name: Restore pre-commit environment | ||
id: cache-precommit | ||
uses: actions/[email protected].5 | ||
uses: actions/[email protected].8 | ||
with: | ||
path: ${{ env.PRE_COMMIT_CACHE }} | ||
key: >- | ||
|
@@ -86,12 +86,12 @@ jobs: | |
uses: actions/[email protected] | ||
- name: Set up Python ${{ env.DEFAULT_PYTHON }} | ||
id: python | ||
uses: actions/setup-python@v4.1.0 | ||
uses: actions/setup-python@v4.2.0 | ||
with: | ||
python-version: ${{ env.DEFAULT_PYTHON }} | ||
- name: Restore Python virtual environment | ||
id: cache-venv | ||
uses: actions/[email protected].5 | ||
uses: actions/[email protected].8 | ||
with: | ||
path: venv | ||
key: | ||
|
@@ -104,7 +104,7 @@ jobs: | |
exit 1 | ||
- name: Restore pre-commit environment | ||
id: cache-precommit | ||
uses: actions/[email protected].5 | ||
uses: actions/[email protected].8 | ||
with: | ||
path: ${{ env.PRE_COMMIT_CACHE }} | ||
key: ${{ runner.os }}-${{ needs.prepare-base.outputs.pre-commit-key }} | ||
|
@@ -133,12 +133,12 @@ jobs: | |
uses: actions/[email protected] | ||
- name: Set up Python ${{ env.DEFAULT_PYTHON }} | ||
id: python | ||
uses: actions/setup-python@v4.1.0 | ||
uses: actions/setup-python@v4.2.0 | ||
with: | ||
python-version: ${{ env.DEFAULT_PYTHON }} | ||
- name: Restore Python virtual environment | ||
id: cache-venv | ||
uses: actions/[email protected].5 | ||
uses: actions/[email protected].8 | ||
with: | ||
path: venv | ||
key: | ||
|
@@ -164,12 +164,12 @@ jobs: | |
uses: actions/[email protected] | ||
- name: Set up Python ${{ env.DEFAULT_PYTHON }} | ||
id: python | ||
uses: actions/setup-python@v4.1.0 | ||
uses: actions/setup-python@v4.2.0 | ||
with: | ||
python-version: ${{ env.DEFAULT_PYTHON }} | ||
- name: Restore Python virtual environment | ||
id: cache-venv | ||
uses: actions/[email protected].5 | ||
uses: actions/[email protected].8 | ||
with: | ||
path: venv | ||
key: | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,7 +13,7 @@ on: | |
- ".github/workflows/primer-test.yaml" | ||
|
||
env: | ||
CACHE_VERSION: 20 | ||
CACHE_VERSION: 23 | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
|
@@ -34,7 +34,7 @@ jobs: | |
uses: actions/[email protected] | ||
- name: Set up Python ${{ matrix.python-version }} | ||
id: python | ||
uses: actions/setup-python@v4.1.0 | ||
uses: actions/setup-python@v4.2.0 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Generate partial Python venv restore key | ||
|
@@ -45,7 +45,7 @@ jobs: | |
}}" | ||
- name: Restore Python virtual environment | ||
id: cache-venv | ||
uses: actions/[email protected].5 | ||
uses: actions/[email protected].8 | ||
with: | ||
path: venv | ||
key: >- | ||
|
@@ -74,12 +74,12 @@ jobs: | |
uses: actions/[email protected] | ||
- name: Set up Python ${{ matrix.python-version }} | ||
id: python | ||
uses: actions/setup-python@v4.1.0 | ||
uses: actions/setup-python@v4.2.0 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Restore Python virtual environment | ||
id: cache-venv | ||
uses: actions/[email protected].5 | ||
uses: actions/[email protected].8 | ||
with: | ||
path: venv | ||
key: | ||
|
@@ -109,12 +109,12 @@ jobs: | |
uses: actions/[email protected] | ||
- name: Set up Python ${{ matrix.python-version }} | ||
id: python | ||
uses: actions/setup-python@v4.1.0 | ||
uses: actions/setup-python@v4.2.0 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Restore Python virtual environment | ||
id: cache-venv | ||
uses: actions/[email protected].5 | ||
uses: actions/[email protected].8 | ||
with: | ||
path: venv | ||
key: | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,14 +13,17 @@ on: | |
- completed | ||
|
||
env: | ||
CACHE_VERSION: 20 | ||
# This needs to be the SAME as in the Main and PR job | ||
CACHE_VERSION: 23 | ||
|
||
permissions: | ||
contents: read | ||
pull-requests: write | ||
|
||
jobs: | ||
primer-comment: | ||
# Skip job if the workflow failed | ||
if: ${{ github.event.workflow_run.conclusion == 'success' }} | ||
name: Run | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
@@ -32,34 +35,24 @@ jobs: | |
uses: actions/[email protected] | ||
- name: Set up Python 3.10 | ||
id: python | ||
uses: actions/setup-python@v4.1.0 | ||
uses: actions/setup-python@v4.2.0 | ||
with: | ||
python-version: "3.10" | ||
|
||
# Restore cached Python environment | ||
- name: Generate partial Python venv restore key | ||
id: generate-python-key | ||
run: >- | ||
echo "::set-output name=key::venv-${{ env.CACHE_VERSION }}-${{ | ||
hashFiles('setup.cfg', 'requirements_test.txt', 'requirements_test_min.txt') | ||
}}" | ||
- name: Restore Python virtual environment | ||
id: cache-venv | ||
uses: actions/[email protected].5 | ||
uses: actions/[email protected].8 | ||
with: | ||
path: venv | ||
key: >- | ||
${{ runner.os }}-${{ steps.python.outputs.python-version }}-${{ | ||
steps.generate-python-key.outputs.key }} | ||
restore-keys: | | ||
${{ runner.os }}-${{ steps.python.outputs.python-version }}-venv-${{ env.CACHE_VERSION }}- | ||
- name: Create Python virtual environment | ||
key: | ||
${{ runner.os }}-${{ steps.python.outputs.python-version }}-venv-primer-${{ | ||
env.CACHE_VERSION }} | ||
- name: Fail job if Python cache restore failed | ||
if: steps.cache-venv.outputs.cache-hit != 'true' | ||
run: | | ||
python -m venv venv | ||
. venv/bin/activate | ||
python -m pip install -U pip setuptools wheel | ||
pip install -U -r requirements_test.txt | ||
echo "Failed to restore Python venv from cache" | ||
exit 1 | ||
- name: Download outputs | ||
uses: actions/github-script@v6 | ||
|
@@ -141,10 +134,3 @@ jobs: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
leave_visible: 1 | ||
issue_number: ${{ steps.post-comment.outputs.result }} | ||
- name: Warn about failure | ||
if: ${{ failure() }} | ||
run: | | ||
echo "🤖 **Comment workflow failed**. 🤖" >> $GITHUB_STEP_SUMMARY | ||
echo "" >> $GITHUB_STEP_SUMMARY | ||
echo "Please investigate:" >> $GITHUB_STEP_SUMMARY | ||
echo "@DanielNoord" >> $GITHUB_STEP_SUMMARY |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,8 @@ concurrency: | |
cancel-in-progress: true | ||
|
||
env: | ||
CACHE_VERSION: 20 | ||
# This needs to be the SAME as in the PR and comment job | ||
CACHE_VERSION: 23 | ||
|
||
jobs: | ||
run-primer: | ||
|
@@ -30,7 +31,7 @@ jobs: | |
uses: actions/[email protected] | ||
- name: Set up Python ${{ matrix.python-version }} | ||
id: python | ||
uses: actions/setup-python@v4.1.0 | ||
uses: actions/setup-python@v4.2.0 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
|
@@ -40,25 +41,18 @@ jobs: | |
curl https://api.github.com/repos/PyCQA/astroid/commits | | ||
python -c "import json, sys; print(json.load(sys.stdin)[0]['sha'])" > astroid_sha.txt | ||
# Restore cached Python environment | ||
- name: Generate partial Python venv restore key | ||
id: generate-python-key | ||
run: >- | ||
echo "::set-output name=key::venv-${{ env.CACHE_VERSION }}-${{ | ||
hashFiles('setup.cfg', 'requirements_test.txt', 'requirements_test_min.txt', | ||
'astroid_sha.txt') }}" | ||
- name: Restore Python virtual environment | ||
# Create a re-usable virtual environment | ||
- name: Create Python virtual environment cache | ||
id: cache-venv | ||
uses: actions/[email protected].5 | ||
uses: actions/[email protected].8 | ||
with: | ||
path: venv | ||
key: >- | ||
${{ runner.os }}-${{ steps.python.outputs.python-version }}-${{ | ||
steps.generate-python-key.outputs.key }} | ||
key: | ||
${{ runner.os }}-${{ steps.python.outputs.python-version }}-venv-primer-${{ | ||
env.CACHE_VERSION }} | ||
restore-keys: | | ||
${{ runner.os }}-${{ steps.python.outputs.python-version }}-venv-${{ env.CACHE_VERSION }}- | ||
${{ runner.os }}-${{ steps.python.outputs.python-version }}-venv-primer-${{ env.CACHE_VERSION }} | ||
- name: Create Python virtual environment | ||
if: steps.cache-venv.outputs.cache-hit != 'true' | ||
run: | | ||
python -m venv venv | ||
. venv/bin/activate | ||
|
@@ -77,7 +71,7 @@ jobs: | |
echo "::set-output name=commitstring::$output" | ||
- name: Restore projects cache | ||
id: cache-projects | ||
uses: actions/[email protected].5 | ||
uses: actions/[email protected].8 | ||
with: | ||
path: tests/.pylint_primer_tests/ | ||
key: >- | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,7 +24,8 @@ concurrency: | |
cancel-in-progress: true | ||
|
||
env: | ||
CACHE_VERSION: 20 | ||
# This needs to be the SAME as in the Main and comment job | ||
CACHE_VERSION: 23 | ||
|
||
jobs: | ||
run-primer: | ||
|
@@ -41,46 +42,28 @@ jobs: | |
fetch-depth: 0 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
id: python | ||
uses: actions/setup-python@v4.1.0 | ||
uses: actions/setup-python@v4.2.0 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
- run: npm install @octokit/rest | ||
|
||
- name: Get latest astroid commit | ||
id: get-astroid-sha | ||
run: | | ||
curl https://api.github.com/repos/PyCQA/astroid/commits | | ||
python -c "import json, sys; print(json.load(sys.stdin)[0]['sha'])" > astroid_sha.txt | ||
# Restore cached Python environment | ||
- name: Generate partial Python venv restore key | ||
id: generate-python-key | ||
run: >- | ||
echo "::set-output name=key::venv-${{ env.CACHE_VERSION }}-${{ | ||
hashFiles('setup.cfg', 'requirements_test.txt', 'requirements_test_min.txt', | ||
'astroid_sha.txt') }}" | ||
- name: Restore Python virtual environment | ||
id: cache-venv | ||
uses: actions/[email protected].5 | ||
uses: actions/[email protected].8 | ||
with: | ||
path: venv | ||
key: >- | ||
${{ runner.os }}-${{ steps.python.outputs.python-version }}-${{ | ||
steps.generate-python-key.outputs.key }} | ||
restore-keys: | | ||
${{ runner.os }}-${{ steps.python.outputs.python-version }}-venv-${{ env.CACHE_VERSION }}- | ||
- name: Create Python virtual environment | ||
key: | ||
${{ runner.os }}-${{ steps.python.outputs.python-version }}-venv-primer-${{ | ||
env.CACHE_VERSION }} | ||
- name: Fail job if Python cache restore failed | ||
if: steps.cache-venv.outputs.cache-hit != 'true' | ||
run: | | ||
python -m venv venv | ||
. venv/bin/activate | ||
python -m pip install -U pip setuptools wheel | ||
pip install -U -r requirements_test.txt | ||
# Use bleeding-edge astroid | ||
pip install git+https://github.com/PyCQA/astroid.git | ||
echo "Failed to restore Python venv from cache" | ||
exit 1 | ||
# Cache primer packages | ||
- name: Download last 'main' run info | ||
|
@@ -145,7 +128,7 @@ jobs: | |
echo "::set-output name=commitstring::$output" | ||
- name: Restore projects cache | ||
id: cache-projects | ||
uses: actions/[email protected].5 | ||
uses: actions/[email protected].8 | ||
with: | ||
path: tests/.pylint_primer_tests/ | ||
key: >- | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,7 @@ jobs: | |
uses: actions/[email protected] | ||
- name: Set up Python ${{ env.DEFAULT_PYTHON }} | ||
id: python | ||
uses: actions/setup-python@v4.1.0 | ||
uses: actions/setup-python@v4.2.0 | ||
with: | ||
python-version: ${{ env.DEFAULT_PYTHON }} | ||
- name: Install requirements | ||
|
Oops, something went wrong.