Support clustering using NGT for faster ANN search (#54) #134
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: Smriti Worker CI | |
on: | |
push: | |
branches: | |
- master | |
paths: | |
- worker/** | |
pull_request: | |
branches: | |
- master | |
paths: | |
- worker/** | |
release: | |
types: [published] | |
jobs: | |
ci: | |
name: Integration Check | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./worker | |
steps: | |
- name: Git Checkout | |
uses: actions/checkout@v3 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10.x' | |
- name: Python Version | |
run: python -c "import sys; print(sys.version)" | |
- name: Install Dependencies | |
run: make install | |
- name: Run Lint | |
run: | | |
pip install pylint==2.17.5 | |
make lint | |
- name: Run Test & Cover | |
run: | | |
sudo apt-get install -y libimage-exiftool-perl exiftool libraw-dev | |
make test-install | |
make cover | |
- name: Publish Coverage | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
flags: worker | |
files: worker/coverage.xml | |
publish: | |
if: ${{ (github.event_name == 'release' && github.event.action == 'published') || github.ref == 'refs/heads/master' }} | |
needs: ci | |
name: Publish Docker Image | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./worker | |
steps: | |
- name: Git Checkout | |
uses: actions/checkout@v3 | |
- name: Docker Login | |
run: docker login -u $DOCKER_USER -p $DOCKER_PASSWORD | |
env: | |
DOCKER_USER: ${{ secrets.DOCKER_USER }} | |
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Docker Build | |
run: docker build . --file Dockerfile --tag smritihq/worker:${GITHUB_REF_NAME} | |
- name: Docker Publish | |
run: docker push smritihq/worker:${GITHUB_REF_NAME} |