attempt to fix travis tests
This commit is contained in:
parent
b3e859f89d
commit
5911769cdd
28
.travis.yml
28
.travis.yml
|
@ -10,6 +10,34 @@ addons:
|
||||||
packages:
|
packages:
|
||||||
- postgresql-10
|
- postgresql-10
|
||||||
- postgresql-client-10
|
- postgresql-client-10
|
||||||
|
- postgresql-contrib-10
|
||||||
|
# the following are mastodon dependencies
|
||||||
|
- imagemagick
|
||||||
|
- ffmpeg
|
||||||
|
- libpq-dev
|
||||||
|
- libxml2-dev
|
||||||
|
- libxslt1-dev
|
||||||
|
- file
|
||||||
|
- git-core
|
||||||
|
- g++
|
||||||
|
- libprotobuf-dev
|
||||||
|
- protobuf-compiler
|
||||||
|
- pkg-config nodejs
|
||||||
|
- gcc
|
||||||
|
- autoconf
|
||||||
|
- bison
|
||||||
|
- build-essential
|
||||||
|
- libssl-dev
|
||||||
|
- libyaml-dev
|
||||||
|
- libreadline6-dev
|
||||||
|
- zlib1g-dev
|
||||||
|
- libncurses5-dev
|
||||||
|
- libffi-dev
|
||||||
|
- libgdbm3
|
||||||
|
- libgdbm-dev
|
||||||
|
- redis-tools
|
||||||
|
- libidn11-dev
|
||||||
|
- libicu-dev
|
||||||
services:
|
services:
|
||||||
- redis-server
|
- redis-server
|
||||||
before_install:
|
before_install:
|
||||||
|
|
|
@ -15,13 +15,14 @@ const dir = __dirname
|
||||||
|
|
||||||
const GIT_URL = 'https://github.com/nolanlawson/mastodon'
|
const GIT_URL = 'https://github.com/nolanlawson/mastodon'
|
||||||
const GIT_BRANCH = 'for-pinafore'
|
const GIT_BRANCH = 'for-pinafore'
|
||||||
|
const DB_USER = 'nolan'
|
||||||
|
|
||||||
const envFile = `
|
const envFile = `
|
||||||
PAPERCLIP_SECRET=foo
|
PAPERCLIP_SECRET=foo
|
||||||
SECRET_KEY_BASE=bar
|
SECRET_KEY_BASE=bar
|
||||||
OTP_SECRET=foobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobar
|
OTP_SECRET=foobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobar
|
||||||
DB_PORT=${process.env.PGPORT || 5432}
|
DB_PORT=${process.env.PGPORT || 5432}
|
||||||
DB_USER=nolan
|
DB_USER=${DB_USER}
|
||||||
`
|
`
|
||||||
|
|
||||||
const mastodonDir = path.join(dir, '../mastodon')
|
const mastodonDir = path.join(dir, '../mastodon')
|
||||||
|
@ -42,12 +43,12 @@ async function cloneMastodon () {
|
||||||
async function setupMastodonDatabase () {
|
async function setupMastodonDatabase () {
|
||||||
console.log('Setting up mastodon database...')
|
console.log('Setting up mastodon database...')
|
||||||
try {
|
try {
|
||||||
await exec('dropdb mastodon_development', {cwd: mastodonDir})
|
await exec(`dropdb -U ${DB_USER} mastodon_development`, {cwd: mastodonDir})
|
||||||
} catch (e) { /* ignore */ }
|
} catch (e) { /* ignore */ }
|
||||||
await exec('createdb mastodon_development', {cwd: mastodonDir})
|
await exec(`createdb -U ${DB_USER} mastodon_development`, {cwd: mastodonDir})
|
||||||
|
|
||||||
let dumpFile = path.join(dir, '../fixtures/dump.sql')
|
let dumpFile = path.join(dir, '../fixtures/dump.sql')
|
||||||
await exec(`pg_restore -Fc -d mastodon_development "${dumpFile}"`, {cwd: mastodonDir})
|
await exec(`pg_restore -U ${DB_USER} -Fc -d mastodon_development "${dumpFile}"`, {cwd: mastodonDir})
|
||||||
|
|
||||||
let tgzFile = path.join(dir, '../fixtures/system.tgz')
|
let tgzFile = path.join(dir, '../fixtures/system.tgz')
|
||||||
let systemDir = path.join(mastodonDir, 'public/system')
|
let systemDir = path.join(mastodonDir, 'public/system')
|
||||||
|
|
Loading…
Reference in New Issue