Skip to content

Bump actions/cache from 3.3.2 to 3.3.3 #312

Bump actions/cache from 3.3.2 to 3.3.3

Bump actions/cache from 3.3.2 to 3.3.3 #312

Workflow file for this run

name: CI
env:
venv-path: '.venv'
on:
push:
branches:
- master
pull_request:
workflow_dispatch:
jobs:
black:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install Poetry
uses: snok/install-poetry@v1.3.4
- name: Create venv cache
id: cache-venv
uses: actions/cache@v3.3.3
with:
path: ${{env.venv-path}}
key: ${{ runner.os }}-venv-${{ hashFiles('poetry.lock') }}
restore-keys: |
${{ runner.os }}-venv-
- name: Install dependencies
if: steps.cache-venv.outputs.cache-hit != 'true'
run: |
poetry install
- name: Black
run: |
poetry run black --config pyproject.toml --check --diff --verbose .
isort:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install Poetry
uses: snok/install-poetry@v1.3.4
- name: Create venv cache
id: cache-venv
uses: actions/cache@v3.3.3
with:
path: ${{env.venv-path}}
key: ${{ runner.os }}-venv-${{ hashFiles('poetry.lock') }}
restore-keys: |
${{ runner.os }}-venv-
- name: Install dependencies
if: steps.cache-venv.outputs.cache-hit != 'true'
run: |
poetry install
- name: isort
run: |
poetry run isort --check --diff --verbose .
flake8:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Install Poetry
uses: snok/install-poetry@v1.3.4
- name: Create venv cache
id: cache-venv
uses: actions/cache@v3.3.3
with:
path: ${{env.venv-path}}
key: ${{ runner.os }}-venv-${{ hashFiles('poetry.lock') }}
restore-keys: |
${{ runner.os }}-venv-
- name: Install dependencies
if: steps.cache-venv.outputs.cache-hit != 'true'
run: |
poetry install
- name: flake8
run: |
poetry run flake8 --config .flake8 --verbose --count .
pytest:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11"]
fail-fast: false
steps:
- name: Checkout code
uses: actions/checkout@v4
- 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.3.4
- name: Create venv cache
id: cache-venv
uses: actions/cache@v3.3.3
with:
path: ${{env.venv-path}}
key: ${{ runner.os }}-${{ matrix.python-version }}-venv-${{ hashFiles('poetry.lock') }}
restore-keys: |
${{ runner.os }}-${{ matrix.python-version }}-venv-
- name: Install dependencies
if: steps.cache-venv.outputs.cache-hit != 'true'
run: |
poetry install
- name: Run Pytest
run: |
poetry run pytest --verbose