Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
fffb3f3
Downgrade bw version to 2025.10 (last known fully compatible version)
mvfc Jan 13, 2026
3657bac
Remove initial run if it's not the initial setup. Also accomodate for…
mvfc Feb 25, 2026
7ca7a2a
Add comprehensive testing infrastructure
mvfc Apr 20, 2026
1677238
Add AGENTS.md and organizations exports
mvfc Apr 20, 2026
342ce66
Merge branch 'main' into mc/organization_export
mvfc Apr 20, 2026
abbe355
Enhance CI workflow and improve code documentation
mvfc Apr 20, 2026
5085ab3
Fix CI and run tests, add bin to gitignore
mvfc Apr 20, 2026
703f595
fix CI
mvfc Apr 20, 2026
48bd975
reintroduce raw and bitwarden on org encryption modes
mvfc Apr 20, 2026
66ee852
Enhance CI workflows, add Bitwarden CLI installation, and improve HTM…
mvfc Apr 20, 2026
42a4377
Refactor CI and E2E workflows, improve Docker image testing, and enha…
mvfc Apr 21, 2026
3630b9e
Enhance E2E workflow: use secrets for sensitive data, set up Python a…
mvfc Apr 21, 2026
29f4c68
add missing dependencies in CI lint
mvfc Apr 21, 2026
2192b62
fix dependencies in CI lint
mvfc Apr 21, 2026
d749cec
fix ci errors and add dependencies
mvfc Apr 21, 2026
b53d33e
Update .github/workflows/ci.yml
mvfc Apr 21, 2026
a775658
Update .github/workflows/e2e.yml
mvfc Apr 21, 2026
d0a6fc0
Update .github/workflows/ci.yml
mvfc Apr 21, 2026
37eced1
Merge branch 'mc/organization_export' of github.com:mvfc/backvault in…
mvfc Apr 21, 2026
2e8e53b
Update opencode workflow permissions and enhance README and form UI f…
mvfc Apr 21, 2026
aa8d737
Refactor CI and E2E workflows, enhance opencode conditions, and updat…
mvfc Apr 21, 2026
d1231c9
Fix init.py default to multiple; fix personal file condition
mvfc Apr 21, 2026
a4b9ffc
Add error handling for multiple-mode org exports
mvfc Apr 21, 2026
bdb861b
Fix single+bitwarden silent exit to warning
mvfc Apr 21, 2026
ed92975
Enhance CI/CD workflows, improve error handling, and update organizat…
mvfc Apr 21, 2026
4597a2d
fix appgroup
mvfc Apr 21, 2026
b361562
Update CI workflows, enhance error handling, and improve organization…
mvfc Apr 22, 2026
624eefc
- Fixed 15 issues across various files, including test_run.py, e2e.ym…
mvfc Apr 22, 2026
6641dd7
Enhance E2E tests with ADMIN_TOKEN validation, improve opencode job c…
mvfc Apr 22, 2026
9a4537e
Update src/form.html
mvfc Apr 22, 2026
c44f16e
ruff format
mvfc Apr 22, 2026
58c4181
Merge branch 'mc/organization_export' of github.com:mvfc/backvault in…
mvfc Apr 22, 2026
88407e1
Add cleanup step for appgroup and appuser in E2E workflow
mvfc Apr 22, 2026
dcefb9c
Refactor Dockerfile to create appgroup and appuser idempotently
mvfc Apr 22, 2026
e2cd14f
Update src/bw_client.py
mvfc Apr 22, 2026
15d6bac
Update src/bw_client.py
mvfc Apr 22, 2026
b4a0d1c
Update E2E workflow to pull Docker image and adjust organization expo…
mvfc Apr 22, 2026
d4f22b6
Merge branch 'mc/organization_export' of github.com:mvfc/backvault in…
mvfc Apr 22, 2026
2ca9301
Refactor logging statements for improved readability in organization …
mvfc Apr 22, 2026
d062647
Fix organization export condition to handle None value for org_export…
mvfc Apr 22, 2026
6c60dff
Enhance organization export logic and update E2E tests
mvfc Apr 22, 2026
38689e8
fix dockerfile appgroup
mvfc Apr 22, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
198 changes: 165 additions & 33 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,60 +4,192 @@ permissions:

on:
push:
branches: [ "main" ]
branches: [main]
pull_request:
branches: [ "main" ]
branches: [main]

env:
IMAGE_NAME: ${{ github.repository }}
DOCKER_HUB_IMAGE_NAME: mvflc/backvault
Comment thread
mvfc marked this conversation as resolved.

jobs:
build:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y gcc libsqlite3-dev libsqlcipher-dev libssl-dev
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.13'
- name: Install uv
run: pip install uv
- name: Install dependencies
run: uv sync --dev
- name: Lint with ruff
run: |
uv run ruff check
uv run ruff format
- name: Test with pytest
run: |
uv run pytest

docker-image-test:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.13'

- name: Install system dependencies
run: sudo apt-get update && sudo apt-get install -y libsqlite3-dev libsqlcipher-dev libssl-dev

- name: Install uv
run: pip install uv

- name: Install dependencies
run: uv sync --dev

- name: Run ruff check
run: uv run ruff check

- name: Run ruff format check
run: uv run ruff format --check

unit-tests:
name: Unit Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y gcc libsqlite3-dev libsqlcipher-dev libssl-dev

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.13'

- name: Install uv
run: pip install uv

- name: Install dependencies
run: uv sync --dev

- name: Run pytest
run: uv run pytest -v --cov=src --cov-report=xml --cov-report=term

- name: Upload coverage
uses: actions/upload-artifact@v4
if: always()
with:
name: coverage
path: coverage.xml
retention-days: 7
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
files: ./coverage.xml
flags: unittests
name: codecov-umbrella
fail_ci_if_error: false

docker-build:
name: Docker Build (${{ matrix.platform }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
platform:
- linux/amd64
- linux/arm64
- linux/arm/v7
steps:
- uses: actions/checkout@v4
- name: Sanitize ref name for docker tag
id: sanitize_ref
run: echo "ref_name=$(echo ${{ github.ref_name }} | sed 's/\//-/g')" >> $GITHUB_OUTPUT

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Set platform slug
id: platform-slug
run: |
PLATFORM="${{ matrix.platform }}"
echo "slug=${PLATFORM//\//-}" >> "$GITHUB_OUTPUT"

- name: Build Docker image
uses: docker/build-push-action@v5
with:
platforms: ${{ matrix.platform }}
load: true
tags: |
${{ env.IMAGE_NAME }}:${{ steps.platform-slug.outputs.slug }}-test
cache-from: type=gha
cache-to: type=gha,mode=max

- name: Verify Bitwarden CLI
run: |
docker run --rm --platform ${{ matrix.platform }} \
${{ env.IMAGE_NAME }}:${{ steps.platform-slug.outputs.slug }}-test \
bw --version
Comment thread
greptile-apps[bot] marked this conversation as resolved.

- name: Verify supercronic
run: |
docker run --rm --platform ${{ matrix.platform }} \
${{ env.IMAGE_NAME }}:${{ steps.platform-slug.outputs.slug }}-test \
supercronic --version

- name: Verify Python
run: |
docker run --rm --platform ${{ matrix.platform }} \
${{ env.IMAGE_NAME }}:${{ steps.platform-slug.outputs.slug }}-test \
python3 --version

- name: Verify entrypoint is executable
run: |
docker run --rm --platform ${{ matrix.platform }} \
${{ env.IMAGE_NAME }}:${{ steps.platform-slug.outputs.slug }}-test \
test -x /app/entrypoint.sh

- name: Verify run script is executable
run: |
docker buildx build --platform=${{ matrix.platform }} --load \
-t ${{ env.IMAGE_NAME }}:${{ steps.sanitize_ref.outputs.ref_name }}-test \
.
- name: Run test
docker run --rm --platform ${{ matrix.platform }} \
${{ env.IMAGE_NAME }}:${{ steps.platform-slug.outputs.slug }}-test \
test -x /app/run.sh

- name: Verify required directories exist
run: |
docker run --rm --platform ${{ matrix.platform }} ${{ env.IMAGE_NAME }}:${{ steps.sanitize_ref.outputs.ref_name }}-test bw --version
docker run --rm --platform ${{ matrix.platform }} \
${{ env.IMAGE_NAME }}:${{ steps.platform-slug.outputs.slug }}-test \
sh -c 'test -d /app/backups && test -d /app/db && test -d /app/logs'

docker-push:
name: Docker Push
needs: [docker-build, lint, unit-tests]
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}

- name: Build and push multi-arch image
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64,linux/arm/v7
push: true
tags: |
ghcr.io/${{ env.IMAGE_NAME }}:latest
ghcr.io/${{ env.IMAGE_NAME }}:sha-${{ github.sha }}
${{ env.DOCKER_HUB_IMAGE_NAME }}:latest
${{ env.DOCKER_HUB_IMAGE_NAME }}:sha-${{ github.sha }}
cache-from: type=gha
Comment thread
greptile-apps[bot] marked this conversation as resolved.
cache-to: type=gha,mode=max
125 changes: 125 additions & 0 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
name: E2E Tests
permissions:
contents: read
actions: read

on:
workflow_run:
workflows: [CI]
types: [completed]
branches: [main]
pull_request:
paths:
- 'tests/**'
- '.github/workflows/e2e.yml'
- 'src/**'
workflow_dispatch:

Comment thread
coderabbitai[bot] marked this conversation as resolved.
env:
IMAGE_NAME: docker.io/mvflc/backvault
VAULTWARDEN_PORT: '8888'
VAULTWARDEN_URL: http://localhost:8888

jobs:
e2e:
name: E2E Tests
if: >
(github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success') ||
(github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) ||
github.event_name == 'workflow_dispatch'
Comment thread
coderabbitai[bot] marked this conversation as resolved.
runs-on: ubuntu-latest
services:
vaultwarden:
image: vaultwarden/server:latest
env:
SIGNUPS_ALLOWED: "true"
ADMIN_TOKEN: ${{ secrets.ADMIN_TOKEN }}
I_REALLY_WANT_VOLATILE_STORAGE: "true"
ports:
- 8888:80
steps:
- uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Cleanup appgroup
run: |
sudo delgroup appgroup 2>/dev/null || true
sudo deluser appuser 2>/dev/null || true

- name: Validate ADMIN_TOKEN
env:
ADMIN_TOKEN: ${{ secrets.ADMIN_TOKEN }}
run: |
if [ -z "$ADMIN_TOKEN" ]; then
echo "Error: ADMIN_TOKEN secret is required"
exit 1
fi
Comment thread
coderabbitai[bot] marked this conversation as resolved.

Comment thread
greptile-apps[bot] marked this conversation as resolved.
- name: Pull test image
run: |
docker pull docker.io/mvflc/backvault:test
docker tag docker.io/mvflc/backvault:test ${{ env.IMAGE_NAME }}:test

- name: Wait for Vaultwarden
run: |
for i in $(seq 1 30); do
HTTP_CODE=$(curl -so /dev/null -w '%{http_code}' -L "http://localhost:8888/api/config" 2>/dev/null)
if [ "$HTTP_CODE" = "200" ]; then
echo "Vaultwarden is ready (HTTP $HTTP_CODE)"
exit 0
fi
echo "Attempt $i/30: Waiting... (HTTP $HTTP_CODE)"
sleep 2
done
echo "Error: Vaultwarden failed to start"
exit 1

- name: Verify Vaultwarden is running
run: |
HTTP_CODE=$(curl -so /dev/null -w '%{http_code}' -L "http://localhost:8888/api/config" 2>/dev/null)
if [ "$HTTP_CODE" != "200" ]; then
echo "Error: Vaultwarden health check failed (HTTP $HTTP_CODE)"
exit 1
fi
echo "Vaultwarden health check passed"

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.13'

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'

- name: Install system dependencies
run: sudo apt-get update && sudo apt-get install -y libsqlite3-dev libsqlcipher-dev libssl-dev

- name: Install Bitwarden CLI
run: |
npm install -g @bitwarden/cli

- name: Install dependencies
run: |
pip install uv
uv sync --dev
Comment thread
coderabbitai[bot] marked this conversation as resolved.

- name: Run E2E tests
env:
VAULTWARDEN_URL: ${{ env.VAULTWARDEN_URL }}
BW_TEST_EMAIL: ${{ secrets.BW_TEST_EMAIL }}
BW_TEST_PASSWORD: ${{ secrets.BW_TEST_PASSWORD }}
BW_TEST_MASTER_PASSWORD: ${{ secrets.BW_TEST_MASTER_PASSWORD }}
IMAGE_NAME: ${{ env.IMAGE_NAME }}:test
run: uv run pytest tests/test_e2e.py -v -m e2e -o "addopts="

- name: Cleanup Docker buildx
if: always()
run: |
docker buildx prune --all -f 2>/dev/null || true
Loading
Loading