Skip to content

Commit 68d8ca9

Browse files
author
Andrew Omondi
committed
test workflows
1 parent 260342a commit 68d8ca9

1 file changed

Lines changed: 29 additions & 8 deletions

File tree

.github/workflows/build.yml

Lines changed: 29 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
push:
99
branches: [main]
1010
pull_request:
11-
branches: [main, dev]
11+
branches: [main]
1212
workflow_call:
1313

1414
jobs:
@@ -19,29 +19,50 @@ jobs:
1919
max-parallel: 5
2020
matrix:
2121
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
22+
library :
23+
- name: "kiota_abstractions"
24+
path: "./packages/abstractions"
25+
- name: "kiota_authentication_azure"
26+
path: "./packages/authentication/azure"
27+
- name: "kiota_http"
28+
path: "./packages/http/httpx"
29+
- name: "kiota_serialization_form"
30+
path: "./packages/serialization/form"
31+
- name: "kiota_serialization_json"
32+
path: "./packages/serialization/json"
33+
- name: "kiota_serialization_text"
34+
path: "./packages/serialization/text"
35+
- name: "kiota_serialization_multipart"
36+
path: "./packages/serialization/multipart"
37+
2238
steps:
2339
- name: Checkout
2440
uses: actions/checkout@v4
2541
- name: Set up Python ${{ matrix.python-version }}
2642
uses: actions/setup-python@v5
2743
with:
2844
python-version: ${{ matrix.python-version }}
45+
- name: Change directory to library path
46+
run: |
47+
cd ${{ matrix.library.path }}
48+
echo "Changed directory to ${{ matrix.library.path }}"
49+
pwd
2950
- name: Install dependencies
3051
run: |
31-
python -m pip install --upgrade pip
32-
pip install -r requirements-dev.txt
52+
python -m pip install --upgrade poetry
53+
poetry install
3354
- name: Check code format
3455
run: |
35-
yapf -dr kiota_abstractions
56+
poetry run yapf -dr ${{ matrix.library.name }}
3657
- name: Check import order
3758
run: |
38-
isort kiota_abstractions
59+
poetry run isort ${{ matrix.library.name }}
3960
- name: Lint with Pylint
4061
run: |
41-
pylint kiota_abstractions --disable=W --rcfile=.pylintrc
62+
poetry run pylint ${{ matrix.library.name }} --disable=W --rcfile=.pylintrc
4263
- name: Static type checking with Mypy
4364
run: |
44-
mypy kiota_abstractions
65+
poetry run mypy ${{ matrix.library.name }}
4566
- name: Run the tests
4667
run: |
47-
pytest
68+
poetry run pytest

0 commit comments

Comments
 (0)