-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (48 loc) · 1.41 KB
/
ci.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
55
56
57
58
name: CI
on:
workflow_call:
pull_request:
branches: ["dev"]
push:
branches: ["dev"]
env:
PYTHON_VERSION: 3.11
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/[email protected]
with:
python-version: ${{ env.PYTHON_VERSION }}
- uses: yezz123/setup-uv@v4
- name: Install dependencies
run: uv pip install --python $(which python${{ env.PYTHON_VERSION }}) -r requirements/dev.txt
lint:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/[email protected]
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Lint with pre-commit
uses: pre-commit/[email protected]
with:
extra_args: --all-files
test:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/[email protected]
with:
python-version: ${{ env.PYTHON_VERSION }}
- uses: yezz123/setup-uv@v4
- name: Install tests dependencies
run: uv pip install --python $(which python${{ env.PYTHON_VERSION }}) -r requirements/test.txt
- name: Run tests
run: pytest tests/ -s -vv