-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from piercefreeman/feature/add-deployment-ci
Add CI and deployment pipeline
- Loading branch information
Showing
4 changed files
with
96 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: Deploy | ||
|
||
on: | ||
push: | ||
tags: | ||
- v* | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: "3.10" | ||
|
||
- name: Install Poetry | ||
run: | | ||
curl -sSL https://install.python-poetry.org | python3 - | ||
- name: Configure Poetry | ||
run: | | ||
echo "$(python -c 'import os,sys; print(os.path.realpath(sys.executable))')/$(echo $(python -c 'import sys; print(sys.executable)') | rev | cut -d'/' -f1 | rev)" > "$(python -c 'import site; print(site.USER_BASE)')/bin/python" | ||
echo "PATH=$(python -c 'import site; print(site.USER_BASE)')/bin:$PATH" >> $GITHUB_ENV | ||
- name: Install dependencies with Poetry | ||
run: | | ||
poetry config virtualenvs.create false | ||
poetry install | ||
- name: Build package | ||
run: | | ||
poetry build | ||
- name: Publish package to PyPI | ||
run: | | ||
poetry publish --username ${{ secrets.PYPI_USERNAME }} --password ${{ secrets.PYPI_PASSWORD }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: Pytest | ||
|
||
on: push | ||
|
||
jobs: | ||
build-and-test: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Docker Compose | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y docker-compose | ||
- name: Build and run Docker Compose | ||
run: | | ||
docker-compose up -d | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: "3.10" | ||
|
||
- name: Install Poetry | ||
run: | | ||
curl -sSL https://install.python-poetry.org | python3 - | ||
- name: Configure Poetry | ||
run: | | ||
echo "$(python -c 'import os,sys; print(os.path.realpath(sys.executable))')/$(echo $(python -c 'import sys; print(sys.executable)') | rev | cut -d'/' -f1 | rev)" > "$(python -c 'import site; print(site.USER_BASE)')/bin/python" | ||
echo "PATH=$(python -c 'import site; print(site.USER_BASE)')/bin:$PATH" >> $GITHUB_ENV | ||
- name: Install dependencies with Poetry | ||
run: | | ||
poetry config virtualenvs.create false | ||
poetry install | ||
- name: Run pytest | ||
run: | | ||
poetry run pytest vectordb_orm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
[tool.poetry] | ||
name = "milvus-orm" | ||
name = "vectordb-orm" | ||
version = "0.1.0" | ||
description = "" | ||
authors = ["Pierce Freeman <[email protected]>"] | ||
|