mirror of
https://github.com/Belphemur/CBZOptimizer.git
synced 2025-10-13 20:18:52 +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
|
||||
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
|
||||
run: |
|
||||
mkdir -p test-results
|
||||
|
@@ -1,3 +1,5 @@
|
||||
//go:build ignore
|
||||
|
||||
package main
|
||||
|
||||
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