chore(io): Migrate pkg/build to Medium abstraction (fix CI)
- Fixed formatting in pkg/build/builders/wails.go. - Fixed TestLoadConfig_Testdata and TestDiscover_Testdata to use absolute paths with io.Local to ensure compatibility with GitHub CI. - Verified that all build and release tests pass.
This commit is contained in:
parent
7c25034261
commit
ee4e3b40fd
3 changed files with 6 additions and 3 deletions
|
|
@ -243,6 +243,5 @@ func detectPackageManager(fs io.Medium, dir string) string {
|
||||||
return "npm"
|
return "npm"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Ensure WailsBuilder implements the Builder interface.
|
// Ensure WailsBuilder implements the Builder interface.
|
||||||
var _ build.Builder = (*WailsBuilder)(nil)
|
var _ build.Builder = (*WailsBuilder)(nil)
|
||||||
|
|
|
||||||
|
|
@ -303,8 +303,11 @@ func TestBuildConfig_ToTargets_Good(t *testing.T) {
|
||||||
// TestLoadConfig_Testdata tests loading from the testdata fixture.
|
// TestLoadConfig_Testdata tests loading from the testdata fixture.
|
||||||
func TestLoadConfig_Testdata(t *testing.T) {
|
func TestLoadConfig_Testdata(t *testing.T) {
|
||||||
fs := io.Local
|
fs := io.Local
|
||||||
|
abs, err := filepath.Abs("testdata/config-project")
|
||||||
|
require.NoError(t, err)
|
||||||
|
|
||||||
t.Run("loads config-project fixture", func(t *testing.T) {
|
t.Run("loads config-project fixture", func(t *testing.T) {
|
||||||
cfg, err := LoadConfig(fs, "testdata/config-project")
|
cfg, err := LoadConfig(fs, abs)
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
require.NotNil(t, cfg)
|
require.NotNil(t, cfg)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -197,7 +197,8 @@ func TestFileExists_Good(t *testing.T) {
|
||||||
// These serve as integration tests with realistic project structures.
|
// These serve as integration tests with realistic project structures.
|
||||||
func TestDiscover_Testdata(t *testing.T) {
|
func TestDiscover_Testdata(t *testing.T) {
|
||||||
fs := io.Local
|
fs := io.Local
|
||||||
testdataDir := "testdata"
|
testdataDir, err := filepath.Abs("testdata")
|
||||||
|
require.NoError(t, err)
|
||||||
|
|
||||||
tests := []struct {
|
tests := []struct {
|
||||||
name string
|
name string
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue