-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (42 loc) · 1.05 KB
/
ci.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
name: CI
on: [push]
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install Poetry
run: |
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python -
echo "$HOME/.poetry/bin" >> $GITHUB_PATH
env:
POETRY_VERSION: "1.1.4"
- name: Install dependencies
run: |
poetry install
env:
POETRY_VIRTUALENVS_CREATE: false
- name: Lint
uses: suo/flake8-github-action@releases/v1
with:
checkName: Test
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Format
run: |
poetry run format
if ! git diff --quiet pyratelimit tests ; then exit 1 ; fi
- name: Typecheck
run: |
poetry run typecheck
- name: Test
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
poetry run test
poetry run cov