Skip to content

Bump black from 23.9.1 to 23.12.0 #401

Bump black from 23.9.1 to 23.12.0

Bump black from 23.9.1 to 23.12.0 #401

Workflow file for this run

name: test
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
test:
runs-on: ubuntu-latest
steps:
#----------------------------------------------
# check-out repo and set-up python
#----------------------------------------------
- name: Check out repository
uses: actions/checkout@v4
- name: Set up python
uses: actions/setup-python@v4
with:
python-version: '3.11'
#----------------------------------------------
# ----- install & configure poetry -----
#----------------------------------------------
- name: Load cached Poetry installation
id: cached-poetry
uses: actions/cache@v3
with:
path: ~/.local # the path depends on the OS
key: poetry-3 # increment to reset cache
- name: Install Poetry
if: steps.cached-poetry.outputs.cache-hit != 'true'
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
#----------------------------------------------
# load cached venv if cache exists
#----------------------------------------------
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v3
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
#----------------------------------------------
# install dependencies if cache does not exist
#----------------------------------------------
- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --all-extras --no-interaction --no-root
#----------------------------------------------
# install your root project, if required
#----------------------------------------------
- name: Install project
run: poetry install --all-extras --no-interaction
#----------------------------------------------
# run linter
#----------------------------------------------
- name: Lint with black
run: |
poetry run black . --check
#----------------------------------------------
# run test suite
#----------------------------------------------
- name: Run pytest
run: |
poetry run pytest -n auto
env:
SKIP_HOMEWORK: 1