Add integration testing infrastructure with Podman Compose
- Add docker/podman-compose.yml for Immich server (no ML) - Add test-data/sample-photos/ with 3 public domain images - Add scripts/start-immich.sh for container startup + admin/API key creation - Add scripts/seed-data.sh for uploading test photos and creating albums - Add scripts/stop-immich.sh for cleanup with volume destruction - Add scripts/run-example.sh wrapper (fixed env var export) - Update examples to use IMMICH_URL and IMMICH_API_KEY env vars - Add .github/workflows/integration-test.yml for CI - Update assets.list() to use /search/metadata endpoint - Update AGENTS.md with example running instructions - Add 5 new examples: search_metadata, album_management, timeline_browsing, delete_assets, server_info
This commit is contained in:
51
.github/workflows/integration-test.yml
vendored
Normal file
51
.github/workflows/integration-test.yml
vendored
Normal file
@@ -0,0 +1,51 @@
|
||||
name: Integration Tests
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main, master]
|
||||
pull_request:
|
||||
branches: [main, master]
|
||||
|
||||
jobs:
|
||||
integration-test:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install Rust
|
||||
uses: dtolnay/rust-action@stable
|
||||
|
||||
- name: Install Podman
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y podman
|
||||
sudo systemctl enable --now podman.socket
|
||||
|
||||
- name: Install podman-compose
|
||||
run: |
|
||||
sudo pip3 install podman-compose
|
||||
|
||||
- name: Start Immich
|
||||
run: |
|
||||
./scripts/start-immich.sh
|
||||
|
||||
- name: Seed test data
|
||||
run: |
|
||||
./scripts/seed-data.sh
|
||||
|
||||
- name: Run tests
|
||||
run: |
|
||||
source .env.test
|
||||
cargo test
|
||||
|
||||
- name: Run examples
|
||||
run: |
|
||||
source .env.test
|
||||
cargo run --example basic_usage
|
||||
|
||||
- name: Cleanup
|
||||
if: always()
|
||||
run: |
|
||||
./scripts/stop-immich.sh
|
||||
Reference in New Issue
Block a user