Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Greptile Overview
Greptile Summary
This PR adds comprehensive tests for the build command and updates the Goravel framework to a pre-release version that includes the build command feature.
Key Changes:
TestBuildCommandwhich tests cross-compilation for Windows, Linux, and Darwin platforms using thebuildartisan command with specific flags (-s,-a=amd64,-o,-n)TearDownTestto verify the app can still be built successfully after each test runs by calling./artisangithub.com/goravel/frameworkfrom v1.17.0 to pre-release v1.17.1-0.20260203082038-2649a5eced57 to support the build commandObservations:
Confidence Score: 4/5
Important Files Changed
github.com/goravel/frameworkfrom v1.17.0 to pre-release v1.17.1-0.20260203082038-2649a5eced57TestBuildCommandwith cross-compilation tests and improvedTearDownTestwith app build verificationSequence Diagram
sequenceDiagram participant Test as Test Suite participant Artisan as Facades.Artisan participant Process as Facades.Process participant Build as Build Command participant FS as File System Test->>Test: TestBuildCommand() Note over Test: Windows Build Test->>Artisan: Call("build -s -a=amd64 -o=windows -n=goravel_windows.exe") Artisan->>Build: Execute build command Build->>FS: Create goravel_windows.exe FS-->>Build: Binary created Build-->>Artisan: Success Artisan-->>Test: NoError Test->>FS: Check file.Exists("goravel_windows.exe") FS-->>Test: True Note over Test: Linux Build Test->>Artisan: Call("build -s -a=amd64 -o=linux -n=goravel_linux") Artisan->>Build: Execute build command Build->>FS: Create goravel_linux FS-->>Build: Binary created Build-->>Artisan: Success Artisan-->>Test: NoError Test->>FS: Check file.Exists("goravel_linux") FS-->>Test: True Note over Test: Darwin Build Test->>Artisan: Call("build -s -a=amd64 -o=darwin -n=goravel_darwin") Artisan->>Build: Execute build command Build->>FS: Create goravel_darwin FS-->>Build: Binary created Build-->>Artisan: Success Artisan-->>Test: NoError Test->>FS: Check file.Exists("goravel_darwin") FS-->>Test: True Note over Test: Cleanup in TearDownTest Test->>Process: Run("./artisan") Process-->>Test: Verify app builds Test->>Process: Run("git checkout .") Process-->>Test: Reset changes Test->>Process: Run("git clean -fd") Process-->>Test: Remove untracked files Test->>Process: Run("go mod tidy") Process-->>Test: Clean dependencies