add github action for project build on macos and linux (#838)

* update github action to build and run tests  on macos and linux

* fix docker installation

* Fix poetry installation on macos

* Fix docker installation

* Fix docker installation - start docker daemon

* Change docker installation macos

* Update docker buildx version

* new docker installation

* Add new start docker structure

* Add new start docker structure 2

* update github action to build and run tests  on macos and linux

* Update makefile to fix chroma-hnswlib issue with macos

* fix macos build

* Fix macos issue

* Fix macos

* Reformat Makefile

* updates
This commit is contained in:
Anas DORBANI
2024-04-07 07:54:52 +00:00
committed by GitHub
parent 99a8dc4ff9
commit d3770f1db6
4 changed files with 111 additions and 43 deletions

View File

@@ -3,16 +3,45 @@ name: Build & Run Tests
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
on-macos:
runs-on: macos-latest
strategy:
matrix:
python-version: ["3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: '3.11'
- name: Run tests
python-version: ${{ matrix.python-version }}
- name: Install & Start Docker
run: |
curl -sSL https://install.python-poetry.org | python3 -
make build
poetry run pytest ./tests
brew install colima docker
colima start
- name: Install and configure Poetry
uses: snok/install-poetry@v1
with:
version: latest
- name: Build Environment
run: make build
- name: Run Tests
run: poetry run pytest ./tests
on-linux:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
run: curl -sSL https://install.python-poetry.org | python3 -
- name: Build Environment
run: make build
- name: Run Tests
run: poetry run pytest ./tests