-
Notifications
You must be signed in to change notification settings - Fork 13
55 lines (53 loc) · 1.57 KB
/
test.yaml
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
on:
push:
branches:
- master
pull_request:
types:
- opened
- synchronize
jobs:
ci:
strategy:
fail-fast: false
matrix:
python-version: [3.9]
os: [ubuntu-22.04]
runs-on: ${{ matrix.os }}
services:
rabbitmq-streaming:
image: rabbitmq:3.13.1-management
env:
RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS: "-rabbitmq_stream advertised_host localhost"
ports:
- 5552:5552
- 15672:15672
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install and configure Poetry
uses: snok/install-poetry@v1
with:
version: 1.4.2
virtualenvs-create: true
virtualenvs-in-project: false
- name: Enable RabbitMQ Plugins
run: docker exec ${{ job.services.rabbitmq-streaming.id }} rabbitmq-plugins enable rabbitmq_stream rabbitmq_stream_management rabbitmq_amqp1_0
- name: poetry install
run: poetry install --no-root
- name: isort check-only
run: poetry run isort --check-only .
- name: black check
run: poetry run black --check .
- name: flake8
run: poetry run flake8 --exclude=venv,local_tests,docs/examples --max-line-length=120 --ignore=E203,W503
- name: mypy
run: |
poetry add --group dev requests
poetry add --group dev types-requests
poetry run mypy .
- name: poetry run pytest
run: poetry run pytest