Skip to content

Commit

Permalink
add test to workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Fattouh92 committed Sep 2, 2024
1 parent c52afa6 commit 309822b
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 8 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/publish_pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,30 @@ name: Publish Python 🐍 distribution 📦 to PyPI
on: [push, pull_request]

jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11"]
package: ["happtiq_commons_gen_ai", "happtiq_commons_google_cloud"]

steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
cd packages/${{ matrix.package }}
python -m pip install --upgrade pip
pip install -e '.'
pip install -e '.[dev]'
- name: Test with pytest
run: |
cd packages/${{ matrix.package }}
pytest
build:
name: Build distribution 📦
runs-on: ubuntu-latest
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python

name: Python package
name: Test with pytest

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
on: [push, pull_request]

jobs:
build:

test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
Expand Down

0 comments on commit 309822b

Please sign in to comment.