mirror of
https://github.com/Belphemur/CBZOptimizer.git
synced 2025-10-14 04:28:51 +02:00
ci: add test preparation
This commit is contained in:
5
.github/workflows/test.yml
vendored
5
.github/workflows/test.yml
vendored
@@ -19,6 +19,11 @@ jobs:
|
|||||||
- name: Install gotestsum
|
- name: Install gotestsum
|
||||||
run: go install gotest.tools/gotestsum@latest
|
run: go install gotest.tools/gotestsum@latest
|
||||||
|
|
||||||
|
- name: Setup test environment
|
||||||
|
run: |
|
||||||
|
go build -tags testsetup -o test-setup ./cmd/test-setup
|
||||||
|
./test-setup
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: |
|
run: |
|
||||||
mkdir -p test-results
|
mkdir -p test-results
|
||||||
|
@@ -1,3 +1,5 @@
|
|||||||
|
//go:build ignore
|
||||||
|
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
19
cmd/test-setup/main.go
Normal file
19
cmd/test-setup/main.go
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
//go:build testsetup
|
||||||
|
// +build testsetup
|
||||||
|
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
"log"
|
||||||
|
|
||||||
|
"github.com/belphemur/CBZOptimizer/v2/pkg/converter/webp"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
fmt.Println("Setting up WebP encoder for tests...")
|
||||||
|
if err := webp.PrepareEncoder(); err != nil {
|
||||||
|
log.Fatalf("Failed to prepare WebP encoder: %v", err)
|
||||||
|
}
|
||||||
|
fmt.Println("WebP encoder setup complete.")
|
||||||
|
}
|
Reference in New Issue
Block a user