summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorMarc Mueller <30130371+cdce8p@users.noreply.github.com>2021-02-21 18:27:17 +0100
committerPierre Sassoulas <pierre.sassoulas@gmail.com>2021-02-28 21:52:27 +0100
commitfe01c24e9720eb8ef802a4e4b59edc83c043f6c8 (patch)
tree10381b7359585b5438ef0fce662727e4f007c745 /.github
parentcc8d9185d1b0ca79ed49efd0ee2d3cae5b1cacbb (diff)
downloadpylint-git-fe01c24e9720eb8ef802a4e4b59edc83c043f6c8.tar.gz
CI improvements from pinning astroid version
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/ci.yaml43
1 files changed, 4 insertions, 39 deletions
diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml
index fa9cbeb8d..5c59718d1 100644
--- a/.github/workflows/ci.yaml
+++ b/.github/workflows/ci.yaml
@@ -8,7 +8,7 @@ on:
pull_request: ~
env:
- CACHE_VERSION: 0
+ CACHE_VERSION: 1
DEFAULT_PYTHON: 3.6
PRE_COMMIT_CACHE: ~/.cache/pre-commit
@@ -18,7 +18,6 @@ jobs:
name: Prepare base dependencies
runs-on: ubuntu-latest
outputs:
- astroid-hash: ${{ steps.fetch-astroid-hash.outputs.hash }}
python-key: ${{ steps.generate-python-key.outputs.key }}
pre-commit-key: ${{ steps.generate-pre-commit-key.outputs.key }}
steps:
@@ -29,19 +28,12 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: ${{ env.DEFAULT_PYTHON }}
- - name: Fetch astroid commit hash
- id: fetch-astroid-hash
- run: >-
- echo "::set-output name=hash::"$(
- curl -s https://api.github.com/repos/PyCQA/astroid/branches/master |
- grep -E '^ "sha": "(\S*)' | awk '{print substr($0, 13, 40)}')
- name: Generate partial Python venv restore key
id: generate-python-key
run: >-
echo "::set-output name=key::base-venv-${{ env.CACHE_VERSION }}-${{
hashFiles('pylint/__pkg_info__.py', 'requirements_test.txt',
- 'requirements_test_pypy.txt', 'requirements_docs.txt') }}-${{
- steps.fetch-astroid-hash.outputs.hash }}"
+ 'requirements_test_pypy.txt', 'requirements_docs.txt') }}"
- name: Restore Python virtual environment
id: cache-venv
uses: actions/cache@v2
@@ -51,9 +43,6 @@ jobs:
${{ runner.os }}-${{ steps.python.outputs.python-version }}-${{
steps.generate-python-key.outputs.key }}
restore-keys: |
- ${{ runner.os }}-${{ steps.python.outputs.python-version }}-base-venv-${{ env.CACHE_VERSION }}-${{
- hashFiles('pylint/__pkg_info__.py', 'requirements_test.txt',
- 'requirements_test_pypy.txt', 'requirements_docs.txt') }}-
${{ runner.os }}-${{ steps.python.outputs.python-version }}-base-venv-${{ env.CACHE_VERSION }}-
- name: Create Python virtual environment
if: steps.cache-venv.outputs.cache-hit != 'true'
@@ -61,7 +50,6 @@ jobs:
python -m venv venv
. venv/bin/activate
python -m pip install -U pip setuptools wheel
- pip uninstall -y astroid
pip install -U -r requirements_test.txt
pip install -U -r requirements_docs.txt
pip install -e .
@@ -193,7 +181,6 @@ jobs:
matrix:
python-version: [3.6, 3.7, 3.8, 3.9]
outputs:
- astroid-hash: ${{ steps.fetch-astroid-hash.outputs.hash }}
python-key: ${{ steps.generate-python-key.outputs.key }}
steps:
- name: Check out code from GitHub
@@ -203,19 +190,12 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- - name: Fetch astroid commit hash
- id: fetch-astroid-hash
- run: >-
- echo "::set-output name=hash::"$(
- curl -s https://api.github.com/repos/PyCQA/astroid/branches/master |
- grep -E '^ "sha": "(\S*)' | awk '{print substr($0, 13, 40)}')
- name: Generate partial Python venv restore key
id: generate-python-key
run: >-
echo "::set-output name=key::venv-${{ env.CACHE_VERSION }}-${{
hashFiles('pylint/__pkg_info__.py', 'requirements_test.txt',
- 'requirements_test_pypy.txt') }}-${{
- steps.fetch-astroid-hash.outputs.hash }}"
+ 'requirements_test_pypy.txt') }}"
- name: Restore Python virtual environment
id: cache-venv
uses: actions/cache@v2
@@ -225,9 +205,6 @@ jobs:
${{ 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 }}-${{
- hashFiles('pylint/__pkg_info__.py', 'requirements_test.txt',
- 'requirements_test_pypy.txt') }}-
${{ runner.os }}-${{ steps.python.outputs.python-version }}-venv-${{ env.CACHE_VERSION }}-
- name: Create Python virtual environment
if: steps.cache-venv.outputs.cache-hit != 'true'
@@ -235,7 +212,6 @@ jobs:
python -m venv venv
. venv/bin/activate
python -m pip install -U pip setuptools wheel
- pip uninstall -y astroid
pip install -U -r requirements_test.txt
pip install -e .
@@ -416,7 +392,6 @@ jobs:
matrix:
python-version: ["pypy3"]
outputs:
- astroid-hash: ${{ steps.fetch-astroid-hash.outputs.hash }}
python-key: ${{ steps.generate-python-key.outputs.key }}
steps:
- name: Check out code from GitHub
@@ -426,18 +401,11 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- - name: Fetch astroid commit hash
- id: fetch-astroid-hash
- run: >-
- echo "::set-output name=hash::"$(
- curl -s https://api.github.com/repos/PyCQA/astroid/branches/master |
- grep -E '^ "sha": "(\S*)' | awk '{print substr($0, 13, 40)}')
- name: Generate partial Python venv restore key
id: generate-python-key
run: >-
echo "::set-output name=key::venv-${{ env.CACHE_VERSION }}-${{
- hashFiles('pylint/__pkg_info__.py', 'requirements_test_pypy.txt') }}-${{
- steps.fetch-astroid-hash.outputs.hash }}"
+ hashFiles('pylint/__pkg_info__.py', 'requirements_test_pypy.txt') }}"
- name: Restore Python virtual environment
id: cache-venv
uses: actions/cache@v2
@@ -447,8 +415,6 @@ jobs:
${{ 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 }}-${{
- hashFiles('pylint/__pkg_info__.py', 'requirements_test_pypy.txt') }}-
${{ runner.os }}-${{ steps.python.outputs.python-version }}-venv-${{ env.CACHE_VERSION }}-
- name: Create Python virtual environment
if: steps.cache-venv.outputs.cache-hit != 'true'
@@ -456,7 +422,6 @@ jobs:
python -m venv venv
. venv/bin/activate
python -m pip install -U pip setuptools wheel
- pip uninstall -y astroid
pip install -U -r requirements_test_pypy.txt
pip install -e .