Skip to content

Extract from .tool-versions in CI #284

Extract from .tool-versions in CI

Extract from .tool-versions in CI #284

Workflow file for this run

name: CI
on:
push:
branches: [master]
pull_request: ~
env:
FORCE_COLOR: 1
jobs:
lint:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@master
- uses: actions/cache@v4
with:
path: ~/.local/share/virtualenvs
key: ${{ runner.os }}-poetry-${{ hashFiles('poetry.lock') }}
restore-keys: |
${{ runner.os }}-poetry-
- name: Parse .tool-versions
uses: wistia/[email protected]
with:
prefix: 'tool_version_'
- uses: actions/setup-python@v5
with:
python-version: ${{ env.TOOL_VERSION_PYTHON }}
- name: Install poetry
uses: abatilo/[email protected]
with:
poetry-version: ${{ env.TOOL_VERSION_POETRY }}
- name: Install pip dependencies
run: poetry install
- uses: pre-commit/[email protected]
test:
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: ['3.12', '3.11', '3.10']
steps:
- uses: actions/checkout@master
- uses: actions/cache@v4
with:
path: ~/.local/share/virtualenvs
key: ${{ runner.os }}-${{ matrix.python-version }}-poetry-${{ hashFiles('poetry.lock') }}
restore-keys: |
${{ runner.os }}-poetry-
- name: Parse .tool-versions
uses: wistia/[email protected]
with:
prefix: 'tool_version_'
- uses: actions/setup-python@v5
with:
python-version: '${{ matrix.python-version }}'
- name: Install poetry
uses: abatilo/[email protected]
with:
poetry-version: ${{ env.TOOL_VERSION_POETRY }}
- name: Install pip dependencies
run: poetry install
- name: Run tests
run: poetry run pytest