mirror of
https://github.com/OpenHands/OpenHands.git
synced 2026-03-22 13:47:19 +08:00
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:
47
.github/workflows/build_run-tests.yml
vendored
47
.github/workflows/build_run-tests.yml
vendored
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user