release 0.3.3 version #10
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
name: Docker API Tests | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build-and-publish: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: [ "3.9", "3.10", "3.11", "3.12" ] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v3 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Install Python dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install flake8 pytest numba torch | |
if [ -f "requirements.txt" ]; then pip install -r requirements.txt; fi | |
- name: Run tests | |
run: pytest test/docker_tests/ | |
- name: Login to Docker Hub | |
if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
uses: docker/login-action@v1 | |
with: | |
registry: docker.io | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build and push Docker images | |
if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
push: true | |
tags: birchkwok/minvectordb:latest | |
platforms: linux/amd64, linux/arm64 | |
- name: Cleanup | |
if: always() | |
run: docker stop minvectordb && docker rm minvectordb |