ci: multiple jobs (#3337)
* ci: move playwright install to test:e2e script * test: adjust test db names to avoid conflicts * ci: clean up core job * ci: add db-mongodb build job * chore: add jest setup db adapter logging * chore: install on mongodb job * chore: adjust root deps * chore: use turbo for db-mongodb to ensure build order * chore: use turbo from .bin * chore: add build script for db-postgres * ci: add db-postgres build job * chore: upgrade actions/checkout and actions/setup-node * chore: rename github workflow file to main
This commit is contained in:
@@ -1,18 +1,18 @@
|
||||
import path from 'path';
|
||||
import path from 'path'
|
||||
|
||||
import type { Config, SanitizedConfig } from '../packages/payload/src/config/types';
|
||||
import type { Config, SanitizedConfig } from '../packages/payload/src/config/types'
|
||||
|
||||
import { mongooseAdapter } from '../packages/db-mongodb/src/index';
|
||||
import { postgresAdapter } from '../packages/db-postgres/src/index';
|
||||
import { buildConfig as buildPayloadConfig } from '../packages/payload/src/config/build';
|
||||
import { mongooseAdapter } from '../packages/db-mongodb/src/index'
|
||||
import { postgresAdapter } from '../packages/db-postgres/src/index'
|
||||
import { buildConfig as buildPayloadConfig } from '../packages/payload/src/config/build'
|
||||
|
||||
const databaseAdapters = {
|
||||
mongoose: mongooseAdapter({
|
||||
url: process.env.MONGO_URL || 'mongodb://127.0.0.1/payload',
|
||||
url: 'mongodb://127.0.0.1/payloadtests',
|
||||
}),
|
||||
postgres: postgresAdapter({
|
||||
client: {
|
||||
connectionString: process.env.POSTGRES_URL || 'postgres://127.0.0.1:5432/payload',
|
||||
connectionString: process.env.POSTGRES_URL || 'postgres://127.0.0.1:5432/payloadtests',
|
||||
},
|
||||
}),
|
||||
}
|
||||
|
||||
@@ -1,3 +1,12 @@
|
||||
module.exports = () => {
|
||||
process.env.PAYLOAD_DISABLE_ADMIN = 'true'
|
||||
|
||||
if (process.env.PAYLOAD_DATABASE) {
|
||||
console.log('\n\nUsing database:', process.env.PAYLOAD_DATABASE)
|
||||
if (process.env.PAYLOAD_DATABASE === 'postgres') {
|
||||
process.env.PAYLOAD_DROP_DATABASE = 'true'
|
||||
}
|
||||
} else {
|
||||
console.log('\n\nNo database specified, using default')
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user