Bump actions/checkout from 4 to 5 #61
This file contains hidden or 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
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
--- | |
name: Python package | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
branches: [master] | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
python-version: ['3.8', '3.9', '3.10', '3.11'] | |
os: [ubuntu-20.04, ubuntu-22.04] | |
steps: | |
- name: Check out the code | |
uses: actions/checkout@v5 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install Poetry | |
uses: snok/install-poetry@v1 | |
with: | |
version: '1.5.1' | |
virtualenvs-create: true | |
virtualenvs-in-project: true | |
- name: Load cached venv | |
id: cached-poetry-dependencies | |
uses: actions/cache@v4 | |
with: | |
path: .venv | |
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }} | |
restore-keys: venv-${{ runner.os }}- | |
- name: Install dependencies | |
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' | |
run: poetry install --no-interaction --no-root | |
- name: Install library | |
run: poetry install --no-interaction | |
- name: View poetry --version | |
run: poetry --version | |
- name: Test with pytest | |
run: | | |
poetry run python -m pytest -v --cov=mbstats tests/ | |
- name: Lint with flake8 | |
run: | | |
poetry run flake8 --show-source --statistics --count --ignore E501 mbstats/ | |
- name: Lint with pylint | |
run: | | |
poetry run pylint -j0 --exit-zero mbstats | |
# vim: set shiftwidth=2 tabstop=2 softtabstop=-1 expandtab: |