-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (32 loc) · 1.08 KB
/
pull-request.workflow.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: Code quality check
on: push
jobs:
lint:
name: Code quality check
runs-on: ubuntu-24.04
container: python:3.10.12
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Cache nox environment
id: cached-poetry-dependencies
uses: actions/cache@v3
with:
path: |
.cache/pip
.nox/hooks
key: nox-hooks-${{ hashFiles('**/poetry.lock') }}
restore-keys: nox-hooks-
- name: Code quality check
run: |
apt-get update && apt-get install --no-install-recommends --no-install-suggests -y git
git init
git config --global --add safe.directory '*'
git add .
pip install -U pip
curl -sSL https://install.python-poetry.org | POETRY_VERSION=1.6.1 python3 -
export PATH="/github/home/.local/bin:$PATH"
echo "/github/home/.local/bin" >> ${GITHUB_PATH}
poetry config virtualenvs.in-project true
poetry install --no-interaction --only dev
poetry run nox --session hooks