mirror of
https://github.com/MeshCore-Beacon/beacon-server.git
synced 2026-10-16 13:49:56 +00:00
feat(backup): add protected database and config download (#154)
This commit is contained in:
@@ -47,10 +47,16 @@ jobs:
|
||||
- name: Test
|
||||
run: go test ./...
|
||||
|
||||
- name: Verify backup startup against PostgreSQL 16
|
||||
env:
|
||||
BEACON_TEST_POSTGRES_DSN: postgres://postgres:backup-ci-only@127.0.0.1:5432/postgres?sslmode=disable
|
||||
run: go test ./cmd/beacon -run '^TestBackupConfigurationPostgres$' -count=1 -v
|
||||
|
||||
- name: Verify backup command against PostgreSQL 16
|
||||
run: |
|
||||
CGO_ENABLED=0 go build -o "$RUNNER_TEMP/beacon-backup" ./cmd/beacon-backup
|
||||
CGO_ENABLED=0 go test -c -o "$RUNNER_TEMP/backup.test" ./internal/backup
|
||||
CGO_ENABLED=0 go test -c -o "$RUNNER_TEMP/backup-http.test" ./internal/api/router
|
||||
docker run --rm --network host \
|
||||
-e PGHOST=127.0.0.1 -e PGUSER=postgres -e PGDATABASE=postgres \
|
||||
-e PGPASSWORD=backup-ci-only -e PGSSLMODE=disable \
|
||||
@@ -58,6 +64,11 @@ jobs:
|
||||
-v "$RUNNER_TEMP/beacon-backup:/beacon-backup:ro" \
|
||||
-v "$RUNNER_TEMP/backup.test:/backup.test:ro" \
|
||||
postgres:16-alpine /backup.test -test.run '^TestExportPostgres$' -test.v
|
||||
docker run --rm --network host \
|
||||
-e PGHOST=127.0.0.1 -e PGUSER=postgres -e PGDATABASE=postgres \
|
||||
-e PGPASSWORD=backup-ci-only -e PGSSLMODE=disable -e BEACON_BACKUP_TEST_POSTGRES=1 \
|
||||
-v "$RUNNER_TEMP/backup-http.test:/backup-http.test:ro" \
|
||||
postgres:16-alpine /backup-http.test -test.run '^TestBackupDownloadPostgres$' -test.v
|
||||
|
||||
- name: Install govulncheck
|
||||
run: go install golang.org/x/vuln/cmd/govulncheck@latest
|
||||
|
||||
Reference in New Issue
Block a user