Repository navigation
chore(ci): run tests on multiple operating systems - #10526
Conversation
4002f22 to
4a85b17
Compare
Use `std::path::Path::file_name` instead of manually splitting the database file path by `/`.
This fixes a `@prisma/sdk` test failing on Windows on TypeScript side:
```
FAIL src/__tests__/introspection/introspection.test.ts
× introspection basic (39 ms)
● introspection basic
expect(received).toMatchInlineSnapshot(snapshot)
Snapshot name: `introspection basic 3`
- Snapshot - 1
+ Received + 1
Array [
- "blog.db",
+ "D:\\a\\prisma\\prisma\\packages\\sdk\\src\\__tests__\\introspection\\blog.db",
]
56 | `)
57 | const databases = await engine.listDatabases(schema)
> 58 | expect(databases).toMatchInlineSnapshot(`
| ^
59 | Array [
60 | "blog.db",
61 | ]
at Object.<anonymous> (src/__tests__/introspection/introspection.test.ts:58:21)
› 1 snapshot failed.
```
Ref: prisma/orm#10526
Use `std::path::Path::file_name` instead of manually splitting the database file path by `/`.
This fixes a `@prisma/sdk` test failing on Windows on TypeScript side:
```
FAIL src/__tests__/introspection/introspection.test.ts
× introspection basic (39 ms)
● introspection basic
expect(received).toMatchInlineSnapshot(snapshot)
Snapshot name: `introspection basic 3`
- Snapshot - 1
+ Received + 1
Array [
- "blog.db",
+ "D:\\a\\prisma\\prisma\\packages\\sdk\\src\\__tests__\\introspection\\blog.db",
]
56 | `)
57 | const databases = await engine.listDatabases(schema)
> 58 | expect(databases).toMatchInlineSnapshot(`
| ^
59 | Array [
60 | "blog.db",
61 | ]
at Object.<anonymous> (src/__tests__/introspection/introspection.test.ts:58:21)
› 1 snapshot failed.
```
Ref: prisma/orm#10526
47c8e6e to
a64d74b
Compare
|
And, finally, everything is green! macOS tests look flaky, so I'm not sure about those
Currently they are passing, but they may turn out to be a headache later. Should we maybe extract macOS to a separate optional workflow that won't block the PRs? Windows tests seem to be pretty robust 🎉 |
|
Squashed the 90 commits into one and rebased onto the latest |
|
I wonder how can this test be non-deterministic and just spontaneously swapping two lines compared to a snapshot on FAIL src/__tests__/MigrateDeploy.test.ts |
|
@aqrln likely because this is a log line coming from the engine and not the CLI so the timing can vary slightly, not related to this PR here, looks flaky |
millsp
left a comment
There was a problem hiding this comment.
Awesome work 🎉 💯.
(PS: let's create an issue for the remaining todos)
Use `std::path::Path::file_name` instead of manually splitting the database file path by `/`.
This fixes a `@prisma/sdk` test failing on Windows on TypeScript side:
```
FAIL src/__tests__/introspection/introspection.test.ts
× introspection basic (39 ms)
● introspection basic
expect(received).toMatchInlineSnapshot(snapshot)
Snapshot name: `introspection basic 3`
- Snapshot - 1
+ Received + 1
Array [
- "blog.db",
+ "D:\\a\\prisma\\prisma\\packages\\sdk\\src\\__tests__\\introspection\\blog.db",
]
56 | `)
57 | const databases = await engine.listDatabases(schema)
> 58 | expect(databases).toMatchInlineSnapshot(`
| ^
59 | Array [
60 | "blog.db",
61 | ]
at Object.<anonymous> (src/__tests__/introspection/introspection.test.ts:58:21)
› 1 snapshot failed.
```
Ref: prisma/orm#10526
|
Need to coordinate merging with #10772 |
Co-authored-by: Jan Piotrowski <[email protected]> Co-authored-by: Pierre-Antoine Mills <[email protected]>

Closes #7725