-
Notifications
You must be signed in to change notification settings - Fork 16
48 lines (45 loc) · 1.26 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
name: Test
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.12", "3.11", "3.10", "3.9", "3.8"]
event-loop: [asyncio, uvloop]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
sudo apt-get install libsodium23
python -m pip install -U pip setuptools
- name: Install threema.gateway
run: |
python -m pip install .[dev]
- name: Install uvloop for threema.gateway
if: ${{ matrix.event-loop == 'uvloop' }}
run: |
python -m pip install .[uvloop]
- name: Lint with flake8
run: |
flake8 .
- name: Lint with isort
run: |
isort -c . || (isort --df . && return 1)
- name: Lint with checkdocs
run: |
python setup.py checkdocs
- name: Lint with mypy
run: |
mypy setup.py tests examples threema
- name: Test with pytest
run: |
py.test --loop=${{ matrix.event-loop }}