1+ ---
2+ name : Test Suite
3+
4+ on :
5+ push :
6+ branches : ["master"]
7+ pull_request :
8+ branches : ["master"]
9+
10+ jobs :
11+ tests :
12+ name : " Python ${{ matrix.python-version }}"
13+ runs-on : " ubuntu-latest"
14+
15+ strategy :
16+ matrix :
17+ python-version : ["3.7", "3.8", "3.9"]
18+
19+ services :
20+ zookeeper :
21+ image : confluentinc/cp-zookeeper
22+ ports :
23+ - 32181:32181
24+ env :
25+ ZOOKEEPER_CLIENT_PORT : 32181
26+ ALLOW_ANONYMOUS_LOGIN : yes
27+ options : --hostname zookeeper
28+ kafka :
29+ image : confluentinc/cp-kafka
30+ ports :
31+ - 9092:9092
32+ - 29092:29092
33+ env :
34+ KAFKA_ZOOKEEPER_CONNECT : " zookeeper:32181"
35+ KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR : 1
36+ KAFKA_LISTENER_SECURITY_PROTOCOL_MAP : " PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT"
37+ KAFKA_ADVERTISED_LISTENERS : " PLAINTEXT_HOST://localhost:29092,PLAINTEXT://localhost:9092"
38+ KAFKA_BROKER_ID : 1
39+ ALLOW_PLAINTEXT_LISTENER : yes
40+ options : --hostname kafka
41+ redis :
42+ image : redis:alpine
43+ ports :
44+ - 6379:6379
45+ postgres :
46+ image : postgres:12
47+ env :
48+ POSTGRES_DB : broadcaster
49+ POSTGRES_PASSWORD : postgres
50+ POSTGRES_HOST_AUTH_METHOD : trust
51+ POSTGRES_USER : postgres
52+ ports :
53+ - 5432:5432
54+
55+ steps :
56+ - uses : " actions/checkout@v2"
57+ - uses : " actions/setup-python@v2"
58+ with :
59+ python-version : " ${{ matrix.python-version }}"
60+ - name : " Install dependencies"
61+ run : " scripts/install"
62+ - name : " Run linting checks"
63+ run : " scripts/check"
64+ - name : " Build package & docs"
65+ run : " scripts/build"
66+ - name : " Run tests"
67+ run : " scripts/test"
68+ - name : " Enforce coverage"
69+ run : " scripts/coverage"
0 commit comments