fix: mount /apps and docker socket in PR workflow build-and-deploy-ci job (#41)
Build CI Images / build-ci-base (push) Successful in 1m53s
Release / release (push) Failing after 12m42s

Reviewed-on: #41
Co-authored-by: David Gwilliam <dhgwilliam@gmail.com>
Co-committed-by: David Gwilliam <dhgwilliam@gmail.com>
This commit was merged in pull request #41.
This commit is contained in:
2026-05-20 19:51:35 +00:00
committed by david
parent 861e14503b
commit e455d5dba5
41 changed files with 11130 additions and 533 deletions
+12 -11
View File
@@ -14,22 +14,17 @@ setDefaultTimeout(30000);
// Global browser instance
let browser: Browser;
// Load environment files
const envPath = path.resolve(process.cwd(), '.env');
// Load environment file (gitignored, contains dev database URL)
const envDevPath = path.resolve(process.cwd(), '.env.development');
if (fs.existsSync(envPath)) {
require('dotenv').config({ path: envPath });
}
if (fs.existsSync(envDevPath)) {
require('dotenv').config({ path: envDevPath, override: true });
require('dotenv').config({ path: envDevPath });
}
// Database safety check - prevent tests from running against production
function isProductionDatabase(): boolean {
const dbUrl = process.env.DATABASE_URL || '';
return dbUrl.includes('euchre_camp') && !dbUrl.includes('_dev') && !dbUrl.includes('test');
return dbUrl.includes('euchre_camp') && !dbUrl.includes('_dev') && !dbUrl.includes('_ci') && !dbUrl.includes('test');
}
if (isProductionDatabase()) {
@@ -135,7 +130,8 @@ After(async function () {
where: {
OR: [
{ name: { startsWith: 'Test Tournament' } },
{ name: { startsWith: 'Test Schedule Tournament' } }
{ name: { startsWith: 'Test Schedule Tournament' } },
{ name: { startsWith: 'Recent Tournament' } },
]
},
select: { id: true }
@@ -176,7 +172,9 @@ After(async function () {
{ name: { startsWith: 'Tournament Player' } },
{ name: { startsWith: 'Schedule Player' } },
{ name: { startsWith: 'Test Player' } },
{ name: { startsWith: 'Test Activity Player' } }
{ name: { startsWith: 'Test Activity Player' } },
{ name: { startsWith: 'Home Test Player' } },
{ name: { startsWith: 'HP' } },
]
}
});
@@ -184,7 +182,10 @@ After(async function () {
// Delete test users
await prisma.user.deleteMany({
where: {
email: { startsWith: 'cucumber-' }
OR: [
{ email: { startsWith: 'cucumber-' } },
{ email: { startsWith: 'president-' } },
]
}
});