summaryrefslogtreecommitdiff
path: root/.github/workflows/tests.yaml
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows/tests.yaml')
-rw-r--r--.github/workflows/tests.yaml102
1 files changed, 55 insertions, 47 deletions
diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml
index f03f685e8..703b1680c 100644
--- a/.github/workflows/tests.yaml
+++ b/.github/workflows/tests.yaml
@@ -10,7 +10,11 @@ on:
- doc/data/messages/**
env:
- CACHE_VERSION: 31
+ CACHE_VERSION: 1
+ KEY_PREFIX: venv
+
+permissions:
+ contents: read
jobs:
tests-linux:
@@ -20,33 +24,32 @@ jobs:
strategy:
fail-fast: false
matrix:
- python-version: [3.7, 3.8, 3.9, "3.10"]
+ python-version: [3.7, 3.8, 3.9, "3.10", "3.11"]
outputs:
python-key: ${{ steps.generate-python-key.outputs.key }}
steps:
- name: Check out code from GitHub
- uses: actions/checkout@v3.0.2
+ uses: actions/checkout@v3.1.0
- name: Set up Python ${{ matrix.python-version }}
id: python
- uses: actions/setup-python@v4.2.0
+ uses: actions/setup-python@v4.3.0
with:
python-version: ${{ matrix.python-version }}
+ check-latest: true
- 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')
- }}"
+ echo "key=${{ env.KEY_PREFIX }}-${{ env.CACHE_VERSION }}-${{
+ hashFiles('pyproject.toml', 'requirements_test.txt',
+ 'requirements_test_min.txt') }}" >> $GITHUB_OUTPUT
- name: Restore Python virtual environment
id: cache-venv
- uses: actions/cache@v3.0.8
+ uses: actions/cache@v3.0.11
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
if: steps.cache-venv.outputs.cache-hit != 'true'
run: |
@@ -57,13 +60,15 @@ jobs:
- name: Run pytest
run: |
. venv/bin/activate
+ pip list | grep 'astroid\|pylint'
pytest --durations=10 --benchmark-disable --cov --cov-report= tests/
- name: Run functional tests with minimal messages config
run: |
. venv/bin/activate
+ pip list | grep 'astroid\|pylint'
pytest -vv --minimal-messages-config tests/test_functional.py
- name: Upload coverage artifact
- uses: actions/upload-artifact@v3.1.0
+ uses: actions/upload-artifact@v3.1.1
with:
name: coverage-${{ matrix.python-version }}
path: .coverage
@@ -75,20 +80,21 @@ jobs:
needs: tests-linux
strategy:
matrix:
- python-version: ["3.10"]
+ python-version: ["3.11"]
env:
COVERAGERC_FILE: .coveragerc
steps:
- name: Check out code from GitHub
- uses: actions/checkout@v3.0.2
+ uses: actions/checkout@v3.1.0
- name: Set up Python ${{ matrix.python-version }}
id: python
- uses: actions/setup-python@v4.2.0
+ uses: actions/setup-python@v4.3.0
with:
python-version: ${{ matrix.python-version }}
+ check-latest: true
- name: Restore Python virtual environment
id: cache-venv
- uses: actions/cache@v3.0.8
+ uses: actions/cache@v3.0.11
with:
path: venv
key:
@@ -100,7 +106,7 @@ jobs:
echo "Failed to restore Python venv from cache"
exit 1
- name: Download all coverage artifacts
- uses: actions/download-artifact@v3.0.0
+ uses: actions/download-artifact@v3.0.1
- name: Combine coverage results
run: |
. venv/bin/activate
@@ -121,18 +127,19 @@ jobs:
strategy:
fail-fast: false
matrix:
- python-version: ["3.10"]
+ python-version: ["3.11"]
steps:
- name: Check out code from GitHub
- uses: actions/checkout@v3.0.2
+ uses: actions/checkout@v3.1.0
- name: Set up Python ${{ matrix.python-version }}
id: python
- uses: actions/setup-python@v4.2.0
+ uses: actions/setup-python@v4.3.0
with:
python-version: ${{ matrix.python-version }}
+ check-latest: true
- name: Restore Python virtual environment
id: cache-venv
- uses: actions/cache@v3.0.8
+ uses: actions/cache@v3.0.11
with:
path: venv
key:
@@ -148,6 +155,7 @@ jobs:
. venv/bin/activate
pip install pygal
pip install -e .
+ pip list | grep 'astroid\|pylint'
pytest --exitfirst \
--benchmark-only \
--benchmark-autosave \
@@ -156,9 +164,9 @@ jobs:
- name: Create partial artifact name suffix
id: artifact-name-suffix
run: >-
- echo "::set-output name=datetime::"$(date "+%Y%m%d_%H%M")
+ echo "datetime="$(date "+%Y%m%d_%H%M") >> $GITHUB_OUTPUT
- name: Upload benchmark artifact
- uses: actions/upload-artifact@v3.1.0
+ uses: actions/upload-artifact@v3.1.1
with:
name:
benchmark-${{ runner.os }}-${{ matrix.python-version }}_${{
@@ -173,35 +181,34 @@ jobs:
strategy:
fail-fast: false
matrix:
- python-version: [3.7, 3.8, 3.9, "3.10"]
+ python-version: [3.7, 3.8, 3.9, "3.10", "3.11"]
steps:
- name: Set temp directory
run: echo "TEMP=$env:USERPROFILE\AppData\Local\Temp" >> $env:GITHUB_ENV
# Workaround to set correct temp directory on Windows
# https://github.com/actions/virtual-environments/issues/712
- name: Check out code from GitHub
- uses: actions/checkout@v3.0.2
+ uses: actions/checkout@v3.1.0
- name: Set up Python ${{ matrix.python-version }}
id: python
- uses: actions/setup-python@v4.2.0
+ uses: actions/setup-python@v4.3.0
with:
python-version: ${{ matrix.python-version }}
+ check-latest: true
- 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_min.txt')
- }}"
+ echo "key=venv-${{ env.CACHE_VERSION }}-${{
+ hashFiles('pyproject.toml', 'requirements_test_min.txt')
+ }}" >> $env:GITHUB_OUTPUT
- name: Restore Python virtual environment
id: cache-venv
- uses: actions/cache@v3.0.8
+ uses: actions/cache@v3.0.11
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
if: steps.cache-venv.outputs.cache-hit != 'true'
run: |
@@ -212,6 +219,7 @@ jobs:
- name: Run pytest
run: |
. venv\\Scripts\\activate
+ pip list | grep 'astroid\|pylint'
pytest --durations=10 --benchmark-disable tests/
tests-macos:
@@ -226,28 +234,27 @@ jobs:
python-version: [3.7]
steps:
- name: Check out code from GitHub
- uses: actions/checkout@v3.0.2
+ uses: actions/checkout@v3.1.0
- name: Set up Python ${{ matrix.python-version }}
id: python
- uses: actions/setup-python@v4.2.0
+ uses: actions/setup-python@v4.3.0
with:
python-version: ${{ matrix.python-version }}
+ check-latest: true
- 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_min.txt')
- }}"
+ echo "key=venv-${{ env.CACHE_VERSION }}-${{
+ hashFiles('pyproject.toml', 'requirements_test_min.txt')
+ }}" >> $GITHUB_OUTPUT
- name: Restore Python virtual environment
id: cache-venv
- uses: actions/cache@v3.0.8
+ uses: actions/cache@v3.0.11
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
if: steps.cache-venv.outputs.cache-hit != 'true'
run: |
@@ -258,6 +265,7 @@ jobs:
- name: Run pytest
run: |
. venv/bin/activate
+ pip list | grep 'astroid\|pylint'
pytest --durations=10 --benchmark-disable tests/
tests-pypy:
@@ -270,28 +278,27 @@ jobs:
python-version: ["pypy-3.7", "pypy-3.8", "pypy-3.9"]
steps:
- name: Check out code from GitHub
- uses: actions/checkout@v3.0.2
+ uses: actions/checkout@v3.1.0
- name: Set up Python ${{ matrix.python-version }}
id: python
- uses: actions/setup-python@v4.2.0
+ uses: actions/setup-python@v4.3.0
with:
python-version: ${{ matrix.python-version }}
+ check-latest: true
- 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_min.txt')
- }}"
+ echo "key=venv-${{ env.CACHE_VERSION }}-${{
+ hashFiles('pyproject.toml', 'requirements_test_min.txt')
+ }}" >> $GITHUB_OUTPUT
- name: Restore Python virtual environment
id: cache-venv
- uses: actions/cache@v3.0.8
+ uses: actions/cache@v3.0.11
with:
path: venv
key: >-
${{ runner.os }}-${{ matrix.python-version }}-${{
steps.generate-python-key.outputs.key }}
- restore-keys: |
- ${{ runner.os }}-${{ matrix.python-version }}-venv-${{ env.CACHE_VERSION }}-
- name: Create Python virtual environment
if: steps.cache-venv.outputs.cache-hit != 'true'
run: |
@@ -302,4 +309,5 @@ jobs:
- name: Run pytest
run: |
. venv/bin/activate
+ pip list | grep 'astroid\|pylint'
pytest --durations=10 --benchmark-disable tests/