PR Checks / hadolint (pull_request) Successful in 41s
Docker Build and Push / test (pull_request) Successful in 4m14s
Docker Build and Push / integration-test (pull_request) Failing after 4m23s
Docker Build and Push / build (pull_request) Skipped
PR Checks / pytest (pull_request) Successful in 3m52s
PR Checks / build-test (pull_request) Successful in 5m26s
Two concurrent jobs (docker-build + PR Checks on the same push) both
used container name 'qdrant'; the second job's 'docker rm -f qdrant'
destroyed the first job's Qdrant mid-run, so the test collection 404'd.
Name is now qdrant-${{ github.run_id }} everywhere (cleanup included).
102 lines
3.4 KiB
YAML
102 lines
3.4 KiB
YAML
name: Nightly Rebuild
|
|
|
|
on:
|
|
schedule:
|
|
- cron: '0 0 * * *'
|
|
|
|
jobs:
|
|
hadolint:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
|
- uses: hadolint/hadolint-action@06be81baf89a55ffd0e24b8f04a4185738dd3387 # v3.5.0
|
|
continue-on-error: true
|
|
with:
|
|
dockerfile: pkg/Dockerfile
|
|
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
|
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7
|
|
with:
|
|
python-version: "3.13"
|
|
- name: Install dependencies
|
|
run: pip install -r requirements.txt pytest
|
|
- name: Run unit tests
|
|
run: pytest tests/ -v
|
|
env:
|
|
# indexer/server read env at import; unit tests need no real backend
|
|
QDRANT_URL: http://localhost:6333
|
|
COLLECTION_NAME: test
|
|
|
|
integration-test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
|
|
|
- name: Cleanup old Qdrant container
|
|
run: |
|
|
docker rm -f qdrant-${{ github.run_id }} 2>/dev/null || true
|
|
|
|
- name: Start Qdrant
|
|
run: |
|
|
docker run -d --name qdrant-${{ github.run_id }} \
|
|
--network "container:$(hostname)" \
|
|
docker.io/qdrant/qdrant:latest
|
|
|
|
- name: Wait for Qdrant
|
|
run: |
|
|
for i in $(seq 1 30); do
|
|
curl -s http://localhost:6333/healthz \
|
|
&& echo "QDRANT ready" && break
|
|
echo "Waiting for Qdrant... ($i/30)"
|
|
sleep 1
|
|
done
|
|
curl -s http://localhost:6333/healthz > /dev/null
|
|
|
|
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7
|
|
with:
|
|
python-version: "3.13"
|
|
- name: Install dependencies
|
|
run: pip install -r requirements.txt pytest
|
|
- name: Run integration tests
|
|
run: pytest tests/ -v -m integration
|
|
env:
|
|
QDRANT_URL: http://localhost:6333
|
|
COLLECTION_NAME: test_mcp_maildir
|
|
|
|
- name: Cleanup Qdrant
|
|
if: always()
|
|
run: docker rm -f qdrant-${{ github.run_id }} || true
|
|
|
|
build-push:
|
|
needs: [test, integration-test]
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
|
with:
|
|
fetch-depth: 0
|
|
- uses: docker/setup-buildx-action@f87e5991a6d7451dcb8d9637bfbc97413f497069 # v4
|
|
- uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4
|
|
with:
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
- id: get-latest-tag
|
|
run: |
|
|
TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "")
|
|
echo "tag=$TAG" >> $GITHUB_OUTPUT
|
|
- id: meta
|
|
uses: docker/metadata-action@dc802804100637a589fabce1cb79ff13a1411302 # v6
|
|
with:
|
|
images: jcabillot/mcp-maildir
|
|
tags: |
|
|
type=raw,value=${{ steps.get-latest-tag.outputs.tag }}-latest,enable=${{ steps.get-latest-tag.outputs.tag != '' }}
|
|
- uses: docker/build-push-action@c3c9e263c25d99ce0380d002d59b67737d91b0dc # v7.4.0
|
|
with:
|
|
context: .
|
|
file: pkg/Dockerfile
|
|
push: true
|
|
tags: ${{ steps.meta.outputs.tags }}
|
|
labels: ${{ steps.meta.outputs.labels }}
|
|
pull: true |