mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-29 12:01:32 +02:00
[github] code spaces: add extra-split-tests.json (#33015)
* [github] code spaces: add extra-split-tests.json * [github] address review feedback * [github] add missing bind mount * [monorepo] mount split test configs with :ro * [monorepo] only mount backup/split-tests into web GitOrigin-RevId: 6334a44599a2c8bb79bf1ad698e656c8bee3992b
This commit is contained in:
@@ -11,6 +11,13 @@ import {
|
||||
} from './e2e_test_setup.mjs'
|
||||
import { Project } from '../app/src/models/Project.mjs'
|
||||
import OError from '@overleaf/o-error'
|
||||
import fs from 'node:fs'
|
||||
import Path from 'node:path'
|
||||
import { fileURLToPath } from 'node:url'
|
||||
|
||||
const MONOREPO = Path.dirname(
|
||||
Path.dirname(Path.dirname(Path.dirname(fileURLToPath(import.meta.url))))
|
||||
)
|
||||
|
||||
const { email: USER_EMAIL, password: PASSWORD } = minimist(
|
||||
process.argv.slice(2),
|
||||
@@ -146,8 +153,17 @@ async function main() {
|
||||
if (process.env.NODE_ENV !== 'development') {
|
||||
throw new Error('only available in dev-env')
|
||||
}
|
||||
const extraSplitTests = JSON.parse(
|
||||
await fs.promises.readFile(
|
||||
Path.join(MONOREPO, '.devcontainer/extra-split-tests.json'),
|
||||
'utf-8'
|
||||
)
|
||||
)
|
||||
await waitForDb()
|
||||
await Promise.all([provisionUsers(), provisionSplitTests(true)])
|
||||
await Promise.all([
|
||||
provisionUsers(),
|
||||
provisionSplitTests(true, extraSplitTests),
|
||||
])
|
||||
}
|
||||
|
||||
if (import.meta.main) {
|
||||
|
||||
Reference in New Issue
Block a user