-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (62 loc) · 1.56 KB
/
test.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
name: test
on:
push:
branches:
- main
paths:
- .github/workflows/test.yml
- pyproject.toml
- 'src/**'
- 'tests/**'
pull_request:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
version: ["3.11", "3.12"]
container: python:${{ matrix.version }}
services:
postgres:
image: postgres:16.1-alpine
env:
POSTGRES_PASSWORD: postgres
POSTGRES_DB: test
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
redis:
image: bitnami/redis:7.2.4
env:
REDIS_PASSWORD: password
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
memcached:
image: memcached:1.6.23-alpine
options: >-
--health-cmd "echo 'stats' | nc 127.0.0.1 11211"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v4
- run: pip install poetry
- run: poetry install
--with test
--extras jinja
--extras sqlalchemy
--extras redis
--extras memcached
--no-interaction
- env:
POSTGRES_URL: postgresql+psycopg://postgres:postgres@postgres:5432/test
REDIS_URL: redis://default:password@redis:6379/0
MEMCACHED_ADDR: memcached:11211
run: poetry run pytest