-
Notifications
You must be signed in to change notification settings - Fork 6
62 lines (54 loc) · 1.67 KB
/
main.yaml
File metadata and controls
62 lines (54 loc) · 1.67 KB
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
59
60
61
62
name: Build and test
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
lint:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11"]
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
python-version: ${{ matrix.python-version }}
enable-cache: true
cache-dependency-glob: "uv.lock"
- name: Install dependencies
run: uv sync --dev --locked
- name: Check code quality with flake8
run: uv run tox -e flake8
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11"]
steps:
#----------------------------------------------
# check-out repo and set-up python
#----------------------------------------------
- name: Check out repository
uses: actions/checkout@v4
#----------------------------------------------
# install uv
#----------------------------------------------
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
python-version: ${{ matrix.python-version }}
enable-cache: true
cache-dependency-glob: "uv.lock"
#----------------------------------------------
# install dependencies
#----------------------------------------------
- name: Install dependencies
run: uv sync --dev --locked
#----------------------------------------------
# run test suite
#----------------------------------------------
- name: Run tests
run: uv run python -m unittest discover