diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 18b94f4..8d9fa1a 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -17,6 +17,9 @@ jobs: fail-fast: false matrix: python-version: ["3.10", "3.11", "3.12"] + install-ai-powered-cmd: + - pip install ai_powered + - poetry build && pip install ai_powered steps: - uses: actions/checkout@v4 @@ -24,10 +27,20 @@ jobs: uses: actions/setup-python@v3 with: python-version: ${{ matrix.python-version }} - - name: Install dependencies + - name: Install dev/test dependencies run: | - python -m pip install --upgrade pip - python -m pip install flake8 pytest pytest-xdist ai_powered + python -m pip install --upgrade pip poetry + python -m pip install flake8 pytest pytest-xdist + - name: Install The Tested Package + run: | + if [[ "${{ github.event.head_commit.message }}" == "version:"* ]]; then + echo "This is a version bump commit. Installing the package from pypi." + pip install ai_powered@latest + else + echo "This is not a version bump commit. Installing the package from built wheel." + THIS_PACKAGE_WHL=$(poetry build -f wheel | grep whl | rev | cut -d' ' -f1 | rev) + pip install $THIS_PACKAGE_WHL + fi - name: Lint with flake8 run: | # stop the build if there are Python syntax errors or undefined names