Merge pull request #20 from OpenDreamProject/dependabot/pip/gitpython… #65
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: CI | |
on: | |
workflow_dispatch: | |
pull_request: | |
branches: | |
- master | |
push: | |
jobs: | |
run_pytest: | |
name: Run Checks | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Python setup | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.11" | |
- name: Install poetry | |
run: | | |
python -m pip install -U poetry | |
- id: cache-poetry | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cache/pypoetry/virtualenvs | |
key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }} | |
- name: Install dependencies | |
if: steps.cache-poetry.outputs.cache-hit != 'true' | |
run: | | |
poetry install | |
- name: Run tests | |
run: | | |
poetry run test -v | |
run_lints: | |
name: Run linters | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Python setup | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.11" | |
- name: Install poetry | |
run: | | |
python -m pip install -U poetry | |
- id: cache-poetry | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cache/pypoetry/virtualenvs | |
key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }} | |
- name: Install dependencies | |
if: steps.cache-poetry.outputs.cache-hit != 'true' | |
run: | | |
poetry install | |
- uses: actions/cache@v3 | |
with: | |
path: ~/.cache/pre-commit | |
key: ${{ runner.os }}-pre_commit-${{ hashFiles('.pre-commit-config.yaml') }} | |
- name: Pre-commit linters | |
run: | | |
poetry run pre-commit run --show-diff-on-failure --color=always --all-files |