File tree Expand file tree Collapse file tree 4 files changed +61
-14
lines changed Expand file tree Collapse file tree 4 files changed +61
-14
lines changed Original file line number Diff line number Diff line change
1
+ name : Image Comparator Laravel PR pipeline
2
+
3
+ on :
4
+ pull_request :
5
+ types :
6
+ - assigned
7
+ - opened
8
+ - reopened
9
+ - review_requested
10
+ - synchronize
11
+
12
+ jobs :
13
+ phpunit :
14
+ runs-on : ubuntu-24.04
15
+
16
+ steps :
17
+ - name : Checkout code
18
+ uses : actions/checkout@v3
19
+
20
+ - name : Set up PHP
21
+ uses : shivammathur/setup-php@v2
22
+ with :
23
+ php-version : ' 8.2'
24
+
25
+ - name : Install Composer dependencies
26
+ run : composer install --prefer-dist --no-progress --no-suggest
27
+
28
+ - name : Run PHPUnit tests
29
+ run : ./vendor/bin/phpunit --testsuite=unit
30
+
31
+ phpcs :
32
+ runs-on : ubuntu-24.04
33
+
34
+ steps :
35
+ - name : Checkout code
36
+ uses : actions/checkout@v3
37
+
38
+ - name : Set up PHP
39
+ uses : shivammathur/setup-php@v2
40
+ with :
41
+ php-version : ' 8.2'
42
+
43
+ - name : Install Composer dependencies
44
+ run : composer install --prefer-dist --no-progress --no-suggest
45
+
46
+ - name : Run PHP CodeSniffer
47
+ run : ./vendor/bin/phpcs -p .
Original file line number Diff line number Diff line change 13
13
],
14
14
"require" : {
15
15
"php" : " ^8.1" ,
16
- "sapientpro/image-comparator" : " ^1.1.0 " ,
16
+ "sapientpro/image-comparator" : " ^1.2 " ,
17
17
"illuminate/support" : " ^8.0|^9.0|^10.0|^11.0"
18
18
},
19
19
"autoload" : {
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ public function testCompareImages(): void
16
16
'tests/images/amazon-image.png '
17
17
);
18
18
19
- $ this ->assertSame (87.5 , $ similarity );
19
+ $ this ->assertSame (86.994 , $ similarity );
20
20
21
21
$ similarityArray = Comparator::compareArray (
22
22
'tests/images/ebay-image.png ' ,
@@ -27,8 +27,8 @@ public function testCompareImages(): void
27
27
);
28
28
29
29
$ this ->assertSame ([
30
- 'amazon1 ' => 87.5 ,
31
- 'amazon2 ' => 53.1
30
+ 'amazon1 ' => 86.994 ,
31
+ 'amazon2 ' => 43.436
32
32
], $ similarityArray );
33
33
}
34
34
@@ -39,7 +39,7 @@ public function testDetectSimilarities(): void
39
39
'tests/images/amazon-image.png '
40
40
);
41
41
42
- $ this ->assertSame (87.5 , $ similarity );
42
+ $ this ->assertSame (86.994 , $ similarity );
43
43
44
44
$ similarityArray = Comparator::detectArray (
45
45
'tests/images/ebay-image.png ' ,
@@ -50,8 +50,8 @@ public function testDetectSimilarities(): void
50
50
);
51
51
52
52
$ this ->assertSame ([
53
- 'amazon1 ' => 87.5 ,
54
- 'amazon2 ' => 62.5
53
+ 'amazon1 ' => 86.994 ,
54
+ 'amazon2 ' => 48.59
55
55
], $ similarityArray );
56
56
}
57
57
You can’t perform that action at this time.
0 commit comments