chore: migrate GitHub workflows from Buildjet to Blacksmith (#26247)
* chore: migrate GitHub workflows from Buildjet to Blacksmith - Replace buildjet-*vcpu-ubuntu-2204 runners with blacksmith-*vcpu-ubuntu-2204 - Replace buildjet/cache@v4 with actions/cache@v4 - Replace buildjet/setup-node@v4 with actions/setup-node@v4 - Replace buildjet/cache-delete@v1 with useblacksmith/cache-delete@v1 - Rename delete-buildjet-cache.yml to delete-blacksmith-cache.yml Co-Authored-By: [email protected] <[email protected]> * chore: bump Blacksmith runners to Ubuntu 24.04 Co-Authored-By: [email protected] <[email protected]> * Reduce 16vcpu to 4vcpu for the API v2 E2E * Remove 8vcpu usage * chore: switch Blacksmith runners to ARM architecture Co-Authored-By: [email protected] <[email protected]> * chore: switch Blacksmith runners back to AMD (remove -arm suffix) Co-Authored-By: [email protected] <[email protected]> * fix: improve test cleanup to cover all bookings including reassignment-created ones - Changed afterEach cleanup to find all bookings by eventTypeId instead of tracking bookingIds - This ensures bookings created indirectly by managedEventManualReassignment are also cleaned up - Removed problematic prefix-based deleteMany calls that could affect parallel tests - Fixes idempotencyKey collision errors on high-parallelism CI runners Co-Authored-By: [email protected] <[email protected]> * fix: improve icons screenshot test stability with deviceScaleFactor and increased threshold Co-Authored-By: [email protected] <[email protected]> * fix: cap Playwright workers to 4 to match vCPU allocation on Blacksmith runners Co-Authored-By: [email protected] <[email protected]> --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
1 parent
b6e0182002
commit
2a6a8e635c
33 files changed
+76
-75
No files matched your search
+23
-26
@@ -131,22 +131,31 @@ beforeAll(async () => {
|
||||
});
|
||||
|
||||
afterEach(async () => {
|
||||
// Clean up bookings
|
||||
if (bookingIds.length > 0) {
|
||||
await prisma.bookingReference.deleteMany({
|
||||
where: { bookingId: { in: bookingIds } },
|
||||
// Clean up ALL bookings associated with test event types (including those created by reassignment)
|
||||
// This is more robust than tracking bookingIds since it catches indirectly created bookings
|
||||
if (eventTypeIds.length > 0) {
|
||||
const allBookings = await prisma.booking.findMany({
|
||||
where: { eventTypeId: { in: eventTypeIds } },
|
||||
select: { id: true },
|
||||
});
|
||||
await prisma.attendee.deleteMany({
|
||||
where: { bookingId: { in: bookingIds } },
|
||||
});
|
||||
await prisma.assignmentReason.deleteMany({
|
||||
where: { bookingId: { in: bookingIds } },
|
||||
});
|
||||
await prisma.booking.deleteMany({
|
||||
where: { id: { in: bookingIds } },
|
||||
});
|
||||
bookingIds.splice(0, bookingIds.length);
|
||||
const allBookingIds = allBookings.map((b) => b.id);
|
||||
|
||||
if (allBookingIds.length > 0) {
|
||||
await prisma.bookingReference.deleteMany({
|
||||
where: { bookingId: { in: allBookingIds } },
|
||||
});
|
||||
await prisma.attendee.deleteMany({
|
||||
where: { bookingId: { in: allBookingIds } },
|
||||
});
|
||||
await prisma.assignmentReason.deleteMany({
|
||||
where: { bookingId: { in: allBookingIds } },
|
||||
});
|
||||
await prisma.booking.deleteMany({
|
||||
where: { id: { in: allBookingIds } },
|
||||
});
|
||||
}
|
||||
}
|
||||
bookingIds.splice(0, bookingIds.length);
|
||||
|
||||
// Clean up event types
|
||||
if (eventTypeIds.length > 0) {
|
||||
@@ -255,12 +264,6 @@ describe("managedEventManualReassignment - Integration Tests", () => {
|
||||
it("should record assignment reason for manual reassignment", async () => {
|
||||
const managedEventManualReassignment = (await import("./managedEventManualReassignment")).default;
|
||||
|
||||
await prisma.booking.deleteMany({
|
||||
where: {
|
||||
idempotencyKey: { startsWith: "test-idempotency-" },
|
||||
},
|
||||
});
|
||||
|
||||
const originalUser = await createTestUser({
|
||||
email: "[email protected]",
|
||||
name: "Original User 2",
|
||||
@@ -330,12 +333,6 @@ describe("managedEventManualReassignment - Integration Tests", () => {
|
||||
it("should preserve booking details (attendees, time) during reassignment", async () => {
|
||||
const managedEventManualReassignment = (await import("./managedEventManualReassignment")).default;
|
||||
|
||||
await prisma.booking.deleteMany({
|
||||
where: {
|
||||
idempotencyKey: { startsWith: "test-idempotency-" },
|
||||
},
|
||||
});
|
||||
|
||||
const originalUser = await createTestUser({
|
||||
email: "[email protected]",
|
||||
name: "Original User 3",
|
||||
|
||||
Reference in new issue
Block a user