mirror of https://github.com/buster-so/buster.git
test
This commit is contained in:
parent
d92693413e
commit
6919bdd416
|
@ -109,6 +109,7 @@ jobs:
|
||||||
BRAINTRUST_KEY: ${{ secrets.BRAINTRUST_KEY }}
|
BRAINTRUST_KEY: ${{ secrets.BRAINTRUST_KEY }}
|
||||||
BRAINTRUST_API_KEY: ${{ secrets.BRAINTRUST_API_KEY }}
|
BRAINTRUST_API_KEY: ${{ secrets.BRAINTRUST_API_KEY }}
|
||||||
TRIGGER_SECRET_KEY: ${{ secrets.TRIGGER_SECRET_KEY }}
|
TRIGGER_SECRET_KEY: ${{ secrets.TRIGGER_SECRET_KEY }}
|
||||||
|
TRIGGER_ACCESS_TOKEN: ${{ secrets.TRIGGER_ACCESS_TOKEN }}
|
||||||
R2_ACCOUNT_ID: ${{ secrets.R2_ACCOUNT_ID }}
|
R2_ACCOUNT_ID: ${{ secrets.R2_ACCOUNT_ID }}
|
||||||
R2_ACCESS_KEY_ID: ${{ secrets.R2_ACCESS_KEY_ID }}
|
R2_ACCESS_KEY_ID: ${{ secrets.R2_ACCESS_KEY_ID }}
|
||||||
R2_SECRET_ACCESS_KEY: ${{ secrets.R2_SECRET_ACCESS_KEY }}
|
R2_SECRET_ACCESS_KEY: ${{ secrets.R2_SECRET_ACCESS_KEY }}
|
||||||
|
|
|
@ -13,18 +13,17 @@ const projectRoot = join(__dirname, '..');
|
||||||
// Database connection details from docker-compose.yml
|
// Database connection details from docker-compose.yml
|
||||||
const DB_HOST = 'localhost';
|
const DB_HOST = 'localhost';
|
||||||
const DB_PORT = '54322';
|
const DB_PORT = '54322';
|
||||||
const DB_NAME = 'postgres';
|
|
||||||
const DB_USER = 'postgres';
|
const DB_USER = 'postgres';
|
||||||
const DB_PASSWORD = 'postgres';
|
|
||||||
|
|
||||||
// Function to check if database is accessible
|
// Function to check if database is accessible
|
||||||
function isDatabaseRunning(): boolean {
|
function isDatabaseRunning(): boolean {
|
||||||
try {
|
try {
|
||||||
// Use pg_isready to check if PostgreSQL is accepting connections
|
// Use pg_isready to check if PostgreSQL is accepting connections
|
||||||
execSync(`pg_isready -h ${DB_HOST} -p ${DB_PORT} -U ${DB_USER}`, {
|
const result = execSync(`pg_isready -h ${DB_HOST} -p ${DB_PORT} -U ${DB_USER}`, {
|
||||||
stdio: 'pipe',
|
stdio: 'pipe',
|
||||||
timeout: 45000
|
timeout: 45000
|
||||||
});
|
});
|
||||||
|
console.info('pg_isready result:', result);
|
||||||
return true;
|
return true;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in New Issue