Skip to content

Install Poetry from pip #750

Install Poetry from pip

Install Poetry from pip #750

Workflow file for this run

name: Build and run System Tests
on:
push:
branches:
- 'bump/**'
paths-ignore:
- 'docs/**'
- '*.md'
- 'LICENSE'
pull_request:
branches: [ "master" ]
paths-ignore:
- 'docs/**'
- '*.md'
- 'LICENSE'
workflow_dispatch:
jobs:
build-snap:
name: Build Snap Package
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Cache Snap build
id: cache-snap
uses: actions/cache@v4
with:
path: "*.snap"
key: cache-snap-${{ hashFiles('parts/**', 'snap/**', 'src/**') }}
- name: Build snap package
if: steps.cache-snap.outputs.cache-hit != 'true'
uses: snapcore/action-build@v1
id: build
- name: Save snap artifact
uses: actions/upload-artifact@v4
with:
name: development-snap-package
if-no-files-found: error
path: "*.snap"
prep-backup:
name: Prepare installation and backup state
runs-on: ubuntu-latest
needs: build-snap
services:
selenium:
image: selenium/standalone-chrome:latest
options: --shm-size=2gb
ports:
- 4444:4444
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Download snap artifact
uses: actions/download-artifact@v4
with:
name: development-snap-package
- name: TEST | Install package
run: sudo snap install --dangerous *.snap
- name: TEST | Run Prepare Tests
run: make test-prep -C tests
- name: Backup database and assets
run: |
sudo immich-distribution.backup -a -d
cp -rv /var/snap/immich-distribution/common/backups .
- name: Upload backups and secret.txt
uses: actions/upload-artifact@v4
with:
name: backups
path: |
backups
tests/secret.txt
prep:
name: Prepare & Asset Tests
runs-on: ubuntu-latest
needs: build-snap
services:
selenium:
image: selenium/standalone-chrome:latest
options: --shm-size=2gb
ports:
- 4444:4444
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Download snap artifact
uses: actions/download-artifact@v4
with:
name: development-snap-package
- name: TEST | Install package
run: sudo snap install --dangerous *.snap
- name: TEST | Run Prepare Tests
run: make test-prep -C tests
- name: TEST | Run Selenium Tests
run: make test-selenium -C tests
assets:
name: Test Assets
runs-on: ubuntu-latest
needs: prep-backup
services:
selenium:
image: selenium/standalone-chrome:latest
options: --shm-size=2gb
ports:
- 4444:4444
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Download snap artifact
uses: actions/download-artifact@v4
with:
name: development-snap-package
- name: TEST | Install package
run: sudo snap install --dangerous *.snap
- name: Download backups artifact
uses: actions/download-artifact@v4
with:
name: backups
- name: Wait Immich Distribution to start
run: make wait -C tests
- name: Restore database
run: |
sudo cp -rv ./backups/immich_database_*.sql.xz /var/snap/immich-distribution/common/backups
sudo immich-distribution.restore -y -d /var/snap/immich-distribution/common/backups/immich_database_*.sql.xz
- name: Restore assets
run: |
sudo cp -rv ./backups/immich_assets_*.tar.xz /var/snap/immich-distribution/common/backups
sudo immich-distribution.restore -y -a /var/snap/immich-distribution/common/backups/immich_assets_*.tar.xz
- name: TEST | Run Selenium Tests
run: make test-selenium -C tests
sync:
name: Test Sync Service
runs-on: ubuntu-latest
needs: prep-backup
services:
selenium:
image: selenium/standalone-chrome:latest
options: --shm-size=2gb
ports:
- 4444:4444
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Download snap artifact
uses: actions/download-artifact@v4
with:
name: development-snap-package
- name: TEST | Install package
run: |
sudo snap install --dangerous *.snap
- name: Download backups artifact
uses: actions/download-artifact@v4
with:
name: backups
- name: Wait Immich Distribution to start
run: make wait -C tests
- name: Restore database
run: |
sudo cp -rv ./backups/immich_database_*.sql.xz /var/snap/immich-distribution/common/backups
sudo immich-distribution.restore -y -d /var/snap/immich-distribution/common/backups/immich_database_*.sql.xz
- name: Restore assets
run: |
sudo cp -rv ./backups/immich_assets_*.tar.xz /var/snap/immich-distribution/common/backups
sudo immich-distribution.restore -y -a /var/snap/immich-distribution/common/backups/immich_assets_*.tar.xz
- name: TEST | Run Sync Tests
run: EXPECTED_INITIAL_IMAGE_COUNT=0 make test-sync -C tests