-
Notifications
You must be signed in to change notification settings - Fork 35
84 lines (63 loc) · 1.66 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
name: CI/CD
on:
push:
branches:
- master
pull_request: {}
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Poetry
run: pipx install poetry
- name: Setup Python ${{ matrix.py }}
uses: actions/setup-python@v4
with:
python-version: "3.7"
cache: 'poetry'
- name: Install linting tools
run: poetry install --only dev
- name: Run Black
run: poetry run black --check sherlock tests
- name: Run iSort
run: poetry run isort --check sherlock tests
- name: Run flake8
run: poetry run flake8 sherlock tests
- name: Run pycodestyle
run: poetry run pycodestyle sherlock tests
test:
name: Test ${{ matrix.py }} - ${{ matrix.os }}
runs-on: ${{ matrix.os }}-latest
strategy:
fail-fast: false
matrix:
os:
- Ubuntu
py:
- "3.7"
- "3.8"
- "3.9"
- "3.10"
- "3.11"
env:
REDIS_HOST: 127.0.0.1
ETCD_HOST: 127.0.0.1
MEMCACHED_HOST: 127.0.0.1
steps:
- uses: actions/checkout@v3
- name: Install Poetry
run: pipx install poetry
- name: Setup Python ${{ matrix.py }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.py }}
cache: 'poetry'
- name: Install `libmemcached-dev`
run: sudo apt-get install -y libmemcached-dev
- name: Install sherlock
run: poetry install --all-extras
- name: Run tests
run: poetry run tox
- uses: codecov/codecov-action@v3