Skip to content

Commit 23bfff8

Browse files
authored
Merge pull request #49 from Visual-Regression-Tracker/57-build-finish
57 build finish
2 parents 9875ce3 + 4e68171 commit 23bfff8

28 files changed

+1288
-759
lines changed

.vscode/settings.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"files.watcherExclude": {
3+
"**/.git/objects/**": true,
4+
"**/.git/subtree-cache/**": true,
5+
"**/.hg/store/**": true
6+
}
7+
}

package-lock.json

Lines changed: 916 additions & 688 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,16 @@
2121
"test:e2e": "jest --config ./test/jest-e2e.json"
2222
},
2323
"dependencies": {
24-
"@nestjs/common": "^7.3.2",
24+
"@nestjs/common": "^7.4.2",
2525
"@nestjs/config": "^0.5.0",
26-
"@nestjs/core": "^7.3.2",
26+
"@nestjs/core": "^7.4.2",
2727
"@nestjs/jwt": "^7.1.0",
2828
"@nestjs/passport": "^7.1.0",
29-
"@nestjs/platform-express": "^7.3.2",
30-
"@nestjs/platform-socket.io": "^7.3.2",
29+
"@nestjs/platform-express": "^7.4.2",
30+
"@nestjs/platform-socket.io": "^7.4.2",
3131
"@nestjs/swagger": "^4.5.12",
32-
"@nestjs/websockets": "^7.3.2",
33-
"@prisma/client": "^2.2.2",
32+
"@nestjs/websockets": "^7.4.2",
33+
"@prisma/client": "^2.4.1",
3434
"bcryptjs": "^2.4.3",
3535
"class-transformer": "^0.3.1",
3636
"class-validator": "^0.12.2",
@@ -44,15 +44,15 @@
4444
"pngjs": "^5.0.0",
4545
"reflect-metadata": "^0.1.13",
4646
"rimraf": "^3.0.2",
47-
"rxjs": "^6.6.0",
47+
"rxjs": "^6.6.2",
4848
"swagger-ui-express": "^4.1.4",
4949
"uuid-apikey": "^1.4.6"
5050
},
5151
"devDependencies": {
5252
"@nestjs/cli": "^7.4.1",
5353
"@nestjs/schematics": "^7.0.1",
54-
"@nestjs/testing": "^7.3.2",
55-
"@prisma/cli": "^2.2.2",
54+
"@nestjs/testing": "^7.4.2",
55+
"@prisma/cli": "^2.4.1",
5656
"@types/bcryptjs": "^2.4.2",
5757
"@types/express": "^4.17.7",
5858
"@types/jest": "26.0.5",
@@ -61,19 +61,19 @@
6161
"@types/passport-local": "^1.0.33",
6262
"@types/pixelmatch": "^5.2.1",
6363
"@types/pngjs": "^3.4.2",
64-
"@types/socket.io": "^2.1.10",
64+
"@types/socket.io": "^2.1.11",
6565
"@types/supertest": "^2.0.10",
6666
"@types/uuid-apikey": "^1.4.0",
6767
"@typescript-eslint/eslint-plugin": "^2.34.0",
6868
"@typescript-eslint/parser": "^2.34.0",
6969
"eslint": "^6.8.0",
7070
"eslint-config-prettier": "^6.11.0",
7171
"eslint-plugin-import": "^2.22.0",
72-
"jest": "^26.1.0",
72+
"jest": "^26.3.0",
7373
"prettier": "^2.0.5",
7474
"supertest": "^4.0.2",
75-
"ts-jest": "^26.1.3",
76-
"ts-loader": "^8.0.1",
75+
"ts-jest": "^26.2.0",
76+
"ts-loader": "^8.0.2",
7777
"ts-node": "^8.10.2",
7878
"tsconfig-paths": "^3.9.0",
7979
"typescript": "^3.9.7"
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Migration `20200812213545-build-run-status`
2+
3+
This migration has been generated by Pavel Strunkin at 8/12/2020, 9:35:45 PM.
4+
You can check out the [state of the schema](./schema.prisma) after the migration.
5+
6+
## Database Steps
7+
8+
```sql
9+
ALTER TABLE "public"."Build" ADD COLUMN "isRunning" boolean ;
10+
```
11+
12+
## Changes
13+
14+
```diff
15+
diff --git schema.prisma schema.prisma
16+
migration 20200728221159-zero-diff-tolerance..20200812213545-build-run-status
17+
--- datamodel.dml
18+
+++ datamodel.dml
19+
@@ -3,9 +3,9 @@
20+
}
21+
datasource db {
22+
provider = "postgresql"
23+
- url = "***"
24+
+ url = "***"
25+
}
26+
model Build {
27+
id String @default(uuid()) @id
28+
@@ -18,8 +18,9 @@
29+
updatedAt DateTime @updatedAt
30+
createdAt DateTime @default(now())
31+
user User? @relation(fields: [userId], references: [id])
32+
userId String?
33+
+ isRunning Boolean?
34+
}
35+
model Project {
36+
id String @default(uuid()) @id
37+
```
38+
39+
Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
generator client {
2+
provider = "prisma-client-js"
3+
}
4+
5+
datasource db {
6+
provider = "postgresql"
7+
url = "***"
8+
}
9+
10+
model Build {
11+
id String @default(uuid()) @id
12+
number Int?
13+
branchName String?
14+
status String?
15+
testRuns TestRun[]
16+
projectId String
17+
project Project @relation(fields: [projectId], references: [id])
18+
updatedAt DateTime @updatedAt
19+
createdAt DateTime @default(now())
20+
user User? @relation(fields: [userId], references: [id])
21+
userId String?
22+
isRunning Boolean?
23+
}
24+
25+
model Project {
26+
id String @default(uuid()) @id
27+
name String
28+
mainBranchName String @default("master")
29+
builds Build[]
30+
testVariations TestVariation[]
31+
updatedAt DateTime @updatedAt
32+
createdAt DateTime @default(now())
33+
34+
@@unique([name])
35+
}
36+
37+
model TestRun {
38+
id String @default(uuid()) @id
39+
imageName String
40+
diffName String?
41+
diffPercent Float?
42+
diffTollerancePercent Float @default(0)
43+
pixelMisMatchCount Int?
44+
status TestStatus
45+
buildId String
46+
build Build @relation(fields: [buildId], references: [id])
47+
testVariationId String
48+
testVariation TestVariation @relation(fields: [testVariationId], references: [id])
49+
merge Boolean @default(false)
50+
updatedAt DateTime @updatedAt
51+
createdAt DateTime @default(now())
52+
// Test variation data
53+
name String @default("")
54+
browser String?
55+
device String?
56+
os String?
57+
viewport String?
58+
baselineName String?
59+
ignoreAreas String @default("[]")
60+
comment String?
61+
baseline Baseline?
62+
branchName String @default("master")
63+
baselineBranchName String?
64+
}
65+
66+
model TestVariation {
67+
id String @default(uuid()) @id
68+
name String
69+
branchName String @default("master")
70+
browser String?
71+
device String?
72+
os String?
73+
viewport String?
74+
baselineName String?
75+
ignoreAreas String @default("[]")
76+
projectId String
77+
project Project @relation(fields: [projectId], references: [id])
78+
testRuns TestRun[]
79+
baselines Baseline[]
80+
comment String?
81+
updatedAt DateTime @updatedAt
82+
createdAt DateTime @default(now())
83+
84+
@@unique([name, browser, device, os, viewport, branchName])
85+
}
86+
87+
model Baseline {
88+
id String @default(uuid()) @id
89+
baselineName String
90+
testVariationId String
91+
testVariation TestVariation @relation(fields: [testVariationId], references: [id])
92+
testRunId String?
93+
testRun TestRun? @relation(fields: [testRunId], references: [id])
94+
updatedAt DateTime @updatedAt
95+
createdAt DateTime @default(now())
96+
}
97+
98+
model User {
99+
id String @default(uuid()) @id
100+
email String @unique
101+
password String
102+
firstName String?
103+
lastName String?
104+
apiKey String @unique
105+
isActive Boolean @default(true)
106+
builds Build[]
107+
updatedAt DateTime @updatedAt
108+
createdAt DateTime @default(now())
109+
}
110+
111+
enum TestStatus {
112+
failed
113+
new
114+
ok
115+
unresolved
116+
approved
117+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"version": "0.3.14-fixed",
3+
"steps": [
4+
{
5+
"tag": "CreateField",
6+
"model": "Build",
7+
"field": "isRunning",
8+
"type": "Boolean",
9+
"arity": "Optional"
10+
}
11+
]
12+
}

prisma/migrations/migrate.lock

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@
66
20200627134248-comment-added
77
20200707182652-project-name-unique-constraint
88
20200715232608-branch-strategy
9-
20200728221159-zero-diff-tolerance
9+
20200728221159-zero-diff-tolerance
10+
20200812213545-build-run-status

prisma/package-lock.json

Lines changed: 12 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

prisma/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
"uuid-apikey": "^1.4.6"
1313
},
1414
"devDependencies": {
15-
"@prisma/cli": "^2.2.2",
15+
"@prisma/cli": "^2.4.1",
1616
"@types/bcryptjs": "^2.4.2",
1717
"@types/uuid-apikey": "^1.4.0",
18-
"ts-node": "^8.8.2",
19-
"typescript": "^3.7.4"
18+
"ts-node": "^8.10.2",
19+
"typescript": "^3.9.7"
2020
}
2121
}

prisma/schema.prisma

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ model Build {
1919
createdAt DateTime @default(now())
2020
user User? @relation(fields: [userId], references: [id])
2121
userId String?
22+
isRunning Boolean?
2223
}
2324

2425
model Project {

0 commit comments

Comments
 (0)