-
Notifications
You must be signed in to change notification settings - Fork 1
50 lines (38 loc) · 1.17 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
45
46
47
48
49
50
name: Continuous Integration
on:
pull_request:
branches:
- "main"
jobs:
test:
name: test
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10"]
steps:
- name: Git Checkout
uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Upgrade pip
run: pip install --upgrade pip
- name: Install poetry 1.8.1
run: pip install poetry==1.8.1
# TODO: If we need SSH agent, need repo admin to add secret key
# - name: Setup SSH Agent
# uses: webfactory/[email protected]
# with:
# ssh-private-key: ${{ secrets.SSH_KEY}}
- name: Install dependencies
run: poetry install -vvv
- name: Lint with Flake8
run: poetry run python -m flake8 .
- name: Setup mock env
run: echo "WORKING_DIR='./'" >> "$GITHUB_ENV"
- name: Test with pytest
run: poetry run python -m pytest tests -vs
- name: Formatter check with black
run: poetry run python -m black --check .