mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-04 18:29:27 +02:00
Save DB of tests too
This commit is contained in:
parent
408af46439
commit
772a41e9ea
2 changed files with 13 additions and 2 deletions
|
@ -8,7 +8,6 @@ import { basename, join } from 'path'
|
||||||
import { AbstractCommand, OverrideCommandOptions } from '../shared/index.js'
|
import { AbstractCommand, OverrideCommandOptions } from '../shared/index.js'
|
||||||
|
|
||||||
export class ServersCommand extends AbstractCommand {
|
export class ServersCommand extends AbstractCommand {
|
||||||
|
|
||||||
static flushTests (internalServerNumber: number) {
|
static flushTests (internalServerNumber: number) {
|
||||||
return new Promise<void>((res, rej) => {
|
return new Promise<void>((res, rej) => {
|
||||||
const suffix = ` -- ${internalServerNumber}`
|
const suffix = ` -- ${internalServerNumber}`
|
||||||
|
@ -46,8 +45,19 @@ export class ServersCommand extends AbstractCommand {
|
||||||
await copy(origin, join('artifacts', destname))
|
await copy(origin, join('artifacts', destname))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const saveDBIfNeeded = async () => {
|
||||||
|
if (!isGithubCI()) return
|
||||||
|
|
||||||
|
await ensureDir('artifacts')
|
||||||
|
const destname = join('databases', `peertube-${this.server.internalServerNumber}.sql`)
|
||||||
|
console.log('Saving database %s.', destname)
|
||||||
|
|
||||||
|
exec(`pg_dump peertube_test${this.server.internalServerNumber} > ${destname}`)
|
||||||
|
}
|
||||||
|
|
||||||
if (this.server.parallel) {
|
if (this.server.parallel) {
|
||||||
const promise = saveGithubLogsIfNeeded()
|
const promise = saveGithubLogsIfNeeded()
|
||||||
|
.then(() => saveDBIfNeeded())
|
||||||
.then(() => ServersCommand.flushTests(this.server.internalServerNumber))
|
.then(() => ServersCommand.flushTests(this.server.internalServerNumber))
|
||||||
|
|
||||||
promises.push(promise)
|
promises.push(promise)
|
||||||
|
|
|
@ -47,6 +47,7 @@ OPENDKIM_DOMAINS=<MY DOMAIN>=peertube
|
||||||
# see https://github.com/wader/postfix-relay/pull/18
|
# see https://github.com/wader/postfix-relay/pull/18
|
||||||
OPENDKIM_RequireSafeKeys=no
|
OPENDKIM_RequireSafeKeys=no
|
||||||
|
|
||||||
|
# Comment these variables if your S3 provider does not support object ACL
|
||||||
PEERTUBE_OBJECT_STORAGE_UPLOAD_ACL_PUBLIC="public-read"
|
PEERTUBE_OBJECT_STORAGE_UPLOAD_ACL_PUBLIC="public-read"
|
||||||
PEERTUBE_OBJECT_STORAGE_UPLOAD_ACL_PRIVATE="private"
|
PEERTUBE_OBJECT_STORAGE_UPLOAD_ACL_PRIVATE="private"
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue