-
Notifications
You must be signed in to change notification settings - Fork 1
54 lines (42 loc) · 1.17 KB
/
chatlib.yml
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: Python application
on:
pull_request:
paths:
- "chatlib/**"
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: chatlib
steps:
- uses: actions/checkout@v4
with:
sparse-checkout: "chatlib"
sparse-checkout-cone-mode: false
- name: Set up Python 3.10 🐍
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Run image
uses: abatilo/actions-poetry@v2
with:
poetry-version: "1.7"
- uses: actions/cache@v3
name: Define a cache for the virtual environment based on the dependencies lock file
with:
path: ./.venv
key: venv-${{ hashFiles('poetry.lock') }}
- name: Install dev dependencies
run: |
poetry install --with dev
- name: Lint with ruff
run: poetry run ruff check .
- name: Format with ruff
run: poetry run ruff format --check .
- name: Run the automated tests (for example)
run: poetry run pytest
env:
WIKIJS_API_TOKEN: ${{ secrets.WIKIJS_API_TOKEN }}