Files
semantic-kernel/.github/workflows/python-test.yml
T
Mark Karle 626da41b3e Python unit test GitHub Action (#418)
This will run Python unit tests when code is pushed to the branch.

### Description
- Runs `poetry run pytest` on ubuntu-latest, macos-latest, and
windows-latest for python versions 3.8, 3.9, and 3.10
- This action was run when this workflow was pushed to my forked branch:
https://github.com/mkarle/semantic-kernel/actions/runs/4672544786
2023-04-12 11:02:49 -07:00

31 lines
918 B
YAML

# This workflow will install Python dependencies and run tests with a variety of Python versions and OSes
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
name: Python tests
on: push
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
os: [ ubuntu-latest, windows-latest, macos-latest ]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install poetry pytest
cd python && poetry install
- name: Test with pytest
run: |
cd python && poetry run pytest