Fix GH Actions, remove Python 3.7, re-enable MacOS, remove old dev dependency (#3766)

* Fixing pytest running on incorrect Python version in GitHub actions.
Also removes 3.12 from the testing matrix, and enables MacOS again.

* Dropping Python 3.7

* Update required Python version to ^3.8

* Remove 3.7 asyncio compatibility layer

* Version pinning in GitHub Action
This commit is contained in:
Darren Burns
2023-11-29 14:05:25 +00:00
committed by GitHub
parent ed3924e89c
commit 5603a4da2b
10 changed files with 806 additions and 952 deletions

View File

@@ -16,40 +16,25 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ["3.8", "3.9", "3.10", "3.11"]
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v3.5.2
- name: Install and configure Poetry # This could be cached, too...
uses: snok/install-poetry@v1.3.3
with:
version: 1.4.2
virtualenvs-in-project: true
- uses: actions/checkout@v4.1.1
- name: Install Poetry
run: pipx install poetry==1.7.1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4.7.1
with:
python-version: ${{ matrix.python-version }}
architecture: x64
allow-prereleases: true
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v3
with:
path: .venv
key: venv-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }}
cache: 'poetry'
- name: Install dependencies
run: poetry install --extras syntax
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
# - name: Typecheck with mypy
# run: |
# make typecheck
run: poetry install --no-interaction --extras syntax
- name: Test with pytest
run: |
source $VENV
pytest tests -v --cov=./src/textual --cov-report=xml:./coverage.xml --cov-report term-missing
poetry run pytest tests -v --cov=./src/textual --cov-report=xml:./coverage.xml --cov-report term-missing
- name: Upload snapshot report
if: always()
uses: actions/upload-artifact@v3