Bump dependencies and support Python 3.8-3.13 #24
Workflow file for this run
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
name: CI | |
on: | |
push: | |
branches: | |
- main | |
- develop | |
pull_request: | |
workflow_dispatch: | |
env: | |
POETRY_VERSION: 1.8.4 | |
jobs: | |
flake8: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
- name: Install poetry | |
uses: snok/install-poetry@v1 | |
with: | |
version: ${{ env.POETRY_VERSION }} | |
virtualenvs-create: false | |
# Skip cache because we have few deps | |
- name: Install flake8 | |
run: poetry install --no-root -v -E flake8 | |
- name: Run flake8 | |
run: poetry run flake8 -v . | |
tests: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13'] | |
name: pytest (Python ${{ matrix.python-version }}) | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install poetry | |
uses: snok/install-poetry@v1 | |
with: | |
version: ${{ env.POETRY_VERSION }} | |
virtualenvs-create: true | |
- name: Cache poetry virtualenv | |
uses: actions/cache@v2 | |
id: cache | |
with: | |
path: ~/.cache/pypoetry/virtualenvs | |
key: poetry-tests-${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }} | |
- name: Install test dependencies | |
run: poetry install -v -E test | |
if: steps.cache.outputs.cache-hit != 'true' | |
- name: Run tests | |
run: poetry run py.test --cov st_package_reviewer --cov tests --cov-report term-missing | |
- name: Coveralls | |
continue-on-error: true | |
env: | |
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} | |
run: | | |
pip install coveralls | |
coveralls |