-
Notifications
You must be signed in to change notification settings - Fork 0
81 lines (76 loc) · 2.39 KB
/
pipeline.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
---
name: CI
on:
push:
branches:
- "**"
pull_request:
branches: ["main"]
workflow_dispatch:
jobs:
python_typecheck:
name: "Python ${{ matrix.python-version }}"
runs-on: "ubuntu-latest"
strategy:
matrix:
python-version: ["3.11"]
steps:
- uses: "actions/checkout@v2"
- uses: "actions/setup-python@v2"
with:
python-version: "${{ matrix.python-version }}"
- name: "Install dependencies"
run: |
python -m pip install -r requirements.txt
python -m pip install --upgrade pip setuptools wheel
python -m pip install --upgrade flake8 mypy types-requests types-paramiko
python -m pip install -e .
- name: "Run mypy and flake8 for ${{ matrix.python-version }}"
run: |
flake8 .
cd src
mypy --ignore-missing-imports .
python_code_formatting:
name: "Python ${{ matrix.python-version }}"
runs-on: "ubuntu-latest"
strategy:
matrix:
python-version: ["3.11"]
steps:
- uses: "actions/checkout@v2"
- uses: "actions/setup-python@v2"
with:
python-version: "${{ matrix.python-version }}"
- name: "Install dependencies"
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install --upgrade black isort
- name: "Run black and isort for ${{ matrix.python-version }}"
run: |
python -m black --check .
isort -c .
python_tests:
name: "Python ${{ matrix.python-version }}"
runs-on: "ubuntu-latest"
strategy:
matrix:
python-version: ["3.11"]
steps:
- uses: "actions/checkout@v2"
- uses: "actions/setup-python@v2"
with:
python-version: "${{ matrix.python-version }}"
- name: "Install dependencies"
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install -r requirements.txt
python -m pip install --upgrade pytest coverage
python -m pip install -e .
- name: "Run tests ${{ matrix.python-version }}"
env: # Or as an environment variable
SDK_TEST_CLIENT_ID: ${{ secrets.SDK_TEST_CLIENT_ID }}
SDK_TEST_CLIENT_SECRET: ${{ secrets.SDK_TEST_CLIENT_SECRET }}
run: |
cd tests
coverage run --source=. -m pytest -vv --capture=no
coverage report