Web pdfs use pdfloader #1
Workflow file for this run
This file contains hidden or 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: CI Pipeline | |
| on: | |
| pull_request: | |
| push: | |
| branches: [main] | |
| tags: | |
| - "v*" | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - run: pip install black isort ruff | |
| - run: black --check . | |
| - run: isort --check-only . | |
| - run: ruff check . | |
| build: | |
| runs-on: ubuntu-latest | |
| needs: lint | |
| outputs: | |
| image_tag: ${{ steps.meta.outputs.sha_tag }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Generate tag | |
| id: meta | |
| run: echo "sha_tag=sha-${GITHUB_SHA::7}" >> $GITHUB_OUTPUT | |
| - name: Build and tag Docker image | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: . | |
| file: ./Containerfile | |
| load: true | |
| tags: test-image:${{ steps.meta.outputs.sha_tag }} | |
| test: | |
| needs: [lint, build] | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| db: [pgvector, redis, elasticsearch, qdrant] | |
| services: | |
| pgvector: | |
| image: ankane/pgvector | |
| ports: | |
| - 5432:5432 | |
| env: | |
| POSTGRES_USER: user | |
| POSTGRES_PASSWORD: pass | |
| POSTGRES_DB: mydb | |
| redis: | |
| image: redis/redis-stack-server:6.2.6-v19 | |
| ports: | |
| - 6379:6379 | |
| elasticsearch: | |
| image: elasticsearch:8.11.1 | |
| ports: | |
| - 9200:9200 | |
| env: | |
| discovery.type: single-node | |
| xpack.security.enabled: true | |
| ELASTIC_PASSWORD: changeme | |
| ES_JAVA_OPTS: "-Xms512m -Xmx512m" | |
| qdrant: | |
| image: qdrant/qdrant | |
| ports: | |
| - 6333:6333 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Wait for DB to start | |
| run: sleep 30 | |
| - name: Run embed job | |
| run: docker run --rm --network host test-image:latest | |
| release: | |
| if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/') | |
| runs-on: ubuntu-latest | |
| needs: [lint, build, test] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Log in to Quay.io | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: quay.io | |
| username: ${{ secrets.QUAY_USERNAME }} | |
| password: ${{ secrets.QUAY_PASSWORD }} | |
| - name: Tag and push image | |
| run: | | |
| docker tag test-image:${{ needs.build.outputs.image_tag }} quay.io/dminnear/vector-embedder:${{ needs.build.outputs.image_tag }} | |
| if [[ $GITHUB_REF == refs/tags/* ]]; then | |
| docker tag test-image:${{ needs.build.outputs.image_tag }} quay.io/dminnear/vector-embedder:${GITHUB_REF#refs/tags/} | |
| docker push quay.io/dminnear/vector-embedder:${GITHUB_REF#refs/tags/} | |
| elif [[ $GITHUB_REF == refs/heads/main ]]; then | |
| docker tag test-image:${{ needs.build.outputs.image_tag }} quay.io/dminnear/vector-embedder:latest | |
| docker push quay.io/dminnear/vector-embedder:latest | |
| fi | |
| docker push quay.io/dminnear/vector-embedder:${{ needs.build.outputs.image_tag }} |