-
Notifications
You must be signed in to change notification settings - Fork 1
38 lines (30 loc) · 911 Bytes
/
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
name: CI
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10"]
steps:
- uses: actions/checkout@v3
- name: Run local mailhog container
run: docker-compose up -d
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Cache pip
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-${{ matrix.python-version }}-pip
restore-keys: ${{ runner.os }}-${{ matrix.python-version }}-pip
- run: python -m pip install black flake8
- run: |
flake8
black . --check
- run: python -m pip install -e .
- run: python -m pip install pytest
- run: |
pytest