-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (47 loc) · 1.17 KB
/
ci.yaml
File metadata and controls
55 lines (47 loc) · 1.17 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
name: ci
permissions:
contents: read
on:
pull_request:
push:
branches: [main]
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/setup-python@v6
with:
python-version: '3.10'
- run: python -m pip install pre-commit
shell: bash
- run: python -m pip freeze --local
shell: bash
- uses: actions/cache@v5
with:
path: ~/.cache/pre-commit
key: pre-commit-3|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }}
- run: pre-commit run --all-files --show-diff-on-failure --color=always
shell: bash
unit-tests:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -el {0}
steps:
- uses: actions/checkout@v5
- name: Install poetry
id: install-poetry
run: |
pipx install poetry==1.6.1
shell: bash
- name: install deps and run tests
run: |
python -m venv .venv
source .venv/bin/activate
poetry install --with dev
coverage run -m pytest tests
coverage report --skip-covered