Update poetry lock and reformat #255
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: PR | |
on: | |
pull_request: | |
branches: | |
- main | |
paths: | |
- ni_python_styleguide/** | |
- poetry.lock | |
- pyproject.toml | |
- docs/Coding-Conventions.md | |
- .github/workflows/PR.yml | |
env: | |
POETRY_VERSION: 1.2.2 | |
jobs: | |
checks: | |
runs-on: ubuntu-latest | |
env: | |
PYTHON_VERSION: 3.9 # Use latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ env.PYTHON_VERSION }} | |
- uses: Gr1N/setup-poetry@v8 | |
with: | |
poetry-version: ${{ env.POETRY_VERSION }} | |
# @TODO: This is a workaround for there not being a way to check the lock file | |
# See: https://github.com/python-poetry/poetry/issues/453 | |
- name: Check for lock changes | |
run: | | |
poetry lock --check | |
- uses: actions/cache@v2 | |
with: | |
path: ~/.cache/pypoetry/virtualenvs | |
key: ${{ runner.os }}-poetry-${{ hashFiles('poetry.lock') }} | |
- name: Install the Package | |
run: poetry install -vvv | |
- name: Lint the Code | |
run: poetry run ni-python-styleguide lint | |
tests: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [macos-latest, windows-latest, ubuntu-latest] | |
python-version: [3.7, 3.8, 3.9, '3.10', 3.11, 3.12] | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- uses: Gr1N/setup-poetry@v8 | |
with: | |
poetry-version: ${{ env.POETRY_VERSION }} | |
- uses: actions/cache@v2 | |
with: | |
path: ~/.cache/pypoetry/virtualenvs | |
key: ${{ runner.os }}-poetry-${{ hashFiles('poetry.lock') }} | |
- name: Install the Package | |
run: poetry install | |
- name: Run tests | |
run: poetry run pytest -v |