ci: reduce size of page to pass tests

Fix failing test
This commit is contained in:
Antoine Aflalo
2024-08-28 14:16:51 -04:00
parent 63a1b592c3
commit ce365a6bdf
2 changed files with 5 additions and 3 deletions

View File

@@ -28,7 +28,9 @@ jobs:
mv go-junit-report /usr/local/bin/
- name: Run tests
run: go test -v 2>&1 ./... -coverprofile=coverage.txt | tee test-results.txt
run: |
set -o pipefail
go test -v 2>&1 ./... -coverprofile=coverage.txt | tee test-results.txt
- name: Analyse test results
run: go-junit-report < test-results.txt > report.xml
- name: Upload test result artifact

View File

@@ -125,7 +125,7 @@ func genHugePages(path string) (*manga.Chapter, error) {
var pages []*manga.Page
for i := 0; i < 5; i++ { // Assuming there are 5 pages for the test
img := image.NewRGBA(image.Rect(0, 0, 300, 17000))
img := image.NewRGBA(image.Rect(0, 0, 1, 17000))
buf := new(bytes.Buffer)
err := jpeg.Encode(buf, img, nil)
if err != nil {
@@ -212,7 +212,7 @@ func genMixSmallHuge(path string) (*manga.Chapter, error) {
var pages []*manga.Page
for i := 0; i < 10; i++ { // Assuming there are 5 pages for the test
img := image.NewRGBA(image.Rect(0, 0, 300, 2000*(i+1)))
img := image.NewRGBA(image.Rect(0, 0, 1, 2000*(i+1)))
buf := new(bytes.Buffer)
err := jpeg.Encode(buf, img, nil)
if err != nil {