76586578d0
renovate/stability-days Updates have met minimum release age requirement
Docker Build and Push / test (pull_request) Successful in 1m51s
Docker Build and Push / integration-test (pull_request) Successful in 2m16s
Docker Build and Push / build (pull_request) Successful in 2m8s
94 lines
2.9 KiB
YAML
94 lines
2.9 KiB
YAML
name: Docker Build and Push
|
|
|
|
on:
|
|
pull_request:
|
|
branches: [main]
|
|
push:
|
|
branches: [main]
|
|
schedule:
|
|
- cron: '0 0 * * *'
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
|
|
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6
|
|
with:
|
|
python-version: "3.14"
|
|
- name: Install dependencies
|
|
run: |
|
|
pip install -r requirements.txt pytest
|
|
- name: Run unit tests
|
|
run: pytest tests/ -v --ignore=tests/test_integration.py
|
|
|
|
integration-test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
|
|
|
|
- name: Start Qdrant
|
|
run: |
|
|
docker rm -f qdrant 2>/dev/null || true
|
|
docker run -d --name qdrant \
|
|
--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
|
|
|
|
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6
|
|
with:
|
|
python-version: "3.14"
|
|
- name: Install dependencies
|
|
run: |
|
|
pip install -r requirements.txt pytest
|
|
- name: Run integration tests
|
|
run: pytest tests/test_integration.py -v
|
|
env:
|
|
QDRANT_URL: http://localhost:6333
|
|
COLLECTION_NAME: test_mcp_maildir
|
|
|
|
- name: Cleanup Qdrant
|
|
if: always()
|
|
run: docker rm -f qdrant 2>/dev/null || true
|
|
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
needs: [test, integration-test]
|
|
steps:
|
|
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@bb05f3f5519dd87d3ba754cc423b652a5edd6d2c # v4
|
|
|
|
- name: Login to Docker Hub
|
|
if: github.event_name != 'pull_request'
|
|
uses: docker/login-action@af1e73f918a031802d376d3c8bbc3fe56130a9b0 # v4
|
|
with:
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
|
|
- name: Docker metadata
|
|
id: meta
|
|
uses: docker/metadata-action@dc802804100637a589fabce1cb79ff13a1411302 # v6
|
|
with:
|
|
images: jcabillot/mcp-maildir
|
|
tags: |
|
|
type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }}
|
|
|
|
- name: Build and push
|
|
uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a # v7
|
|
with:
|
|
context: .
|
|
file: pkg/Dockerfile
|
|
push: ${{ github.event_name != 'pull_request' }}
|
|
tags: ${{ steps.meta.outputs.tags }}
|
|
labels: ${{ steps.meta.outputs.labels }}
|
|
pull: true
|