Skip to content

Commit 066be4a

Browse files
committed
Add import order and code format checks to CI
1 parent 9a95e92 commit 066be4a

File tree

1 file changed

+26
-21
lines changed

1 file changed

+26
-21
lines changed

.github/workflows/ci.yml

Lines changed: 26 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,34 +5,39 @@ name: msgraph-sdk-python-core
55

66
on:
77
push:
8-
branches: [ master ]
8+
branches: [master]
99
pull_request:
10-
branches: [ dev ]
10+
branches: [dev]
1111

1212
jobs:
1313
build:
14-
1514
runs-on: ubuntu-latest
1615
strategy:
1716
matrix:
1817
python-version: [3.5, 3.6, 3.7, 3.8]
1918

2019
steps:
21-
- uses: actions/checkout@v2
22-
- name: Set up Python ${{ matrix.python-version }}
23-
uses: actions/setup-python@v1
24-
with:
25-
python-version: ${{ matrix.python-version }}
26-
- name: Install dependencies
27-
run: |
28-
python -m pip install --upgrade pip
29-
pip install pipenv
30-
pipenv install --dev
31-
- name: Lint with Pylint
32-
run: |
33-
pipenv run pylint msgraphcore --disable=W --rcfile=.pylintrc
34-
- name: Test with unittest
35-
run: |
36-
pipenv run coverage run -m unittest discover tests/unit
37-
pipenv run coverage run -m unittest discover tests/integration
38-
pipenv run coverage html
20+
- uses: actions/checkout@v2
21+
- name: Set up Python ${{ matrix.python-version }}
22+
uses: actions/setup-python@v1
23+
with:
24+
python-version: ${{ matrix.python-version }}
25+
- name: Install dependencies
26+
run: |
27+
python -m pip install --upgrade pip
28+
pip install pipenv
29+
pipenv install --dev
30+
- name: Check code format
31+
run: |
32+
pipenv run yapf -dr .
33+
- name: Check import order
34+
run: |
35+
pipenv run isort .
36+
- name: Lint with Pylint
37+
run: |
38+
pipenv run pylint msgraphcore --disable=W --rcfile=.pylintrc
39+
- name: Test with unittest
40+
run: |
41+
pipenv run coverage run -m unittest discover tests/unit
42+
pipenv run coverage run -m unittest discover tests/integration
43+
pipenv run coverage html

0 commit comments

Comments
 (0)