From 2fdd873125e907ff16470899dc0c925c839d562d Mon Sep 17 00:00:00 2001 From: Andrei Betlen Date: Fri, 9 Jun 2023 16:52:40 -0400 Subject: [PATCH] Add gihub action to test published pypi version of package --- .github/workflows/test-pypi.yaml | 70 ++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 .github/workflows/test-pypi.yaml diff --git a/.github/workflows/test-pypi.yaml b/.github/workflows/test-pypi.yaml new file mode 100644 index 0000000..5de1837 --- /dev/null +++ b/.github/workflows/test-pypi.yaml @@ -0,0 +1,70 @@ +name: Tests for PyPI package + +on: + pull_request: + branches: + - main + push: + branches: + - main + +jobs: + build-linux: + + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] + + steps: + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python3 -m pip install --upgrade pip + python3 -m pip install --verbose llama-cpp-python[server,test] + - name: Test with pytest + run: | + python3 -m pytest + + build-windows: + + runs-on: windows-latest + strategy: + matrix: + python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] + + steps: + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python3 -m pip install --upgrade pip + python3 -m pip install --verbose llama-cpp-python[server,test] + - name: Test with pytest + run: | + python3 -m pytest + + build-macos: + + runs-on: macos-latest + strategy: + matrix: + python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] + + steps: + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python3 -m pip install --upgrade pip + python3 -m pip install --verbose llama-cpp-python[server,test] + - name: Test with pytest + run: | + python3 -m pytest \ No newline at end of file