ci: drop tests on 3.8 and add 3.11 and 3.12

This commit is contained in:
ljnsn 2024-05-31 17:37:27 +02:00 committed by ljnsn
parent 5c5a1871f1
commit 8cd70f96a2
1 changed files with 30 additions and 30 deletions

View File

@ -2,9 +2,9 @@ name: Lint and test
on: on:
push: push:
branches: [ "**" ] branches: ["**"]
pull_request: pull_request:
branches: [ master ] branches: [master]
jobs: jobs:
test: test:
@ -12,34 +12,34 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
matrix: matrix:
python_version: ["3.8", "3.9", "3.10"] python_version: ["3.9", "3.10", "3.11", "3.12"]
fail-fast: false fail-fast: false
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python_version }} - name: Set up Python ${{ matrix.python_version }}
uses: actions/setup-python@v2 uses: actions/setup-python@v2
with: with:
python-version: ${{ matrix.python_version }} python-version: ${{ matrix.python_version }}
- uses: actions/cache@v2 - uses: actions/cache@v2
id: cache id: cache
with: with:
path: ${{ env.pythonLocation }} path: ${{ env.pythonLocation }}
key: ${{ runner.os }}-python-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml') }}-root key: ${{ runner.os }}-python-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml') }}-root
- name: Install poetry - name: Install poetry
if: steps.cache.outputs.cache-hit != 'true' if: steps.cache.outputs.cache-hit != 'true'
run: | run: |
python -m pip install --upgrade pip python -m pip install --upgrade pip
python -m pip install poetry python -m pip install poetry
- name: Configure poetry - name: Configure poetry
run: python -m poetry config virtualenvs.create false run: python -m poetry config virtualenvs.create false
- name: Install Dependencies - name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true' if: steps.cache.outputs.cache-hit != 'true'
run: python -m poetry install run: python -m poetry install
- name: Lint with black - name: Lint with black
run: | run: |
# stop the build if there are Python syntax errors or undefined names # stop the build if there are Python syntax errors or undefined names
black --check --diff pandas_ods_reader/ tests/ black --check --diff pandas_ods_reader/ tests/
- name: Test with pytest - name: Test with pytest
run: | run: |
python -m pytest tests/ python -m pytest tests/