Repository: gohugoio/hugo (language: go)

Issue:
Some Windows tests on Go 1.20 have start failing
For a reason that I'm pretty sure must live outside of Hugo:

```
rkup/highlight/chromalexers	[no test files]
?   	github.com/gohugoio/hugo/markup/internal	[no test files]
?   	github.com/gohugoio/hugo/markup/internal/attributes	[no test files]
ok  	github.com/gohugoio/hugo/markup/highlight	1.527s
# github.com/gohugoio/hugo/markup/markup_config.test
FAIL	github.com/gohugoio/hugo/markup/markup_config [build failed]
crt2(.rdata$.refptr.__ImageBase): relocation target __ImageBase not defined
# github.com/gohugoio/hugo/markup/pandoc.test
crt2(.rdata$.refptr.__ImageBase): relocation target __ImageBase not defined
ok  	github.com/gohugoio/hugo/markup/org	1.460s
FAIL	github.com/gohugoio/hugo/markup/pandoc [build failed]
# github.com/gohugoio/hugo/markup/tableofcontents.test
crt2(.rdata$.refptr.__ImageBase): relocation target __ImageBase not defined
# github.com/gohugoio/hugo/markup/rst.test
crt2(.rdata$.refptr.__ImageBase): relocation target __ImageBase not defined
FAIL	github.com/gohugoio/hugo/markup/rst [build failed]
FAIL	github.com/gohugoio/hugo/markup/tableofcontents [build failed]
# github.com/gohugoio/hugo/media.test
FAIL	github.com/gohugoio/hugo/media [build failed]
crt2(.rdata$.refptr.__ImageBase): relocation target __ImageBase not defined
# github.com/gohugoio/hugo/metrics.test
FAIL	github.com/gohugoio/hugo/metrics [build failed]
crt2(.rdata$.refptr.__ImageBase): relocation target __ImageBase not defined
# github.com/gohugoio/hugo/modules.test
crt2(.rdata$.refptr.__ImageBase): relocation target __ImageBase not defined
ok  	github.com/gohugoio/hugo/minifiers	1.511s
FAIL	github.com/gohugoio/hugo/modules [build failed]
# github.com/gohugoio/hugo/modules/npm.test
FAIL	github.com/gohugoio/hugo/modules/npm [build failed]
crt2(.rdata$.refptr.__ImageBase): relocation target __ImageBase not defined
# github.com/gohugoio/hugo/navigation.test
crt2(.rdata$.refptr.__ImageBase): relocation target __ImageBase not defined
FAIL	github.com/gohugoio/hugo/navigation [build failed]
```

If anyone have a clue as to what the above can be?


Discussion / hints:

Fix patch:
diff --git a/magefile.go b/magefile.go
index bd9c5b830c5..2fc2c7f7515 100644
--- a/magefile.go
+++ b/magefile.go
@@ -174,13 +174,13 @@ func Test386() error {
 // Run tests
 func Test() error {
 	env := map[string]string{"GOFLAGS": testGoFlags()}
-	return runCmd(env, goexe, "test", "./...", buildFlags(), "-tags", buildTags())
+	return runCmd(env, goexe, "test", "./...", "-tags", buildTags())
 }
 
 // Run tests with race detector
 func TestRace() error {
 	env := map[string]string{"GOFLAGS": testGoFlags()}
-	return runCmd(env, goexe, "test", "-race", "./...", buildFlags(), "-tags", buildTags())
+	return runCmd(env, goexe, "test", "-race", "./...", "-tags", buildTags())
 }
 
 // Run gofmt linter


Test patch:
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 26156ec9472..f23dde8031e 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -16,14 +16,14 @@ jobs:
   test:
     strategy:
       matrix:
-        go-version: [1.19.x,1.20.x]
+        go-version: [1.19.x, 1.20.x]
         os: [ubuntu-latest, macos-latest, windows-latest]
     runs-on: ${{ matrix.os }}
     steps:
     - name: Checkout code
-      uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
+      uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
     - name: Install Go
-      uses: actions/setup-go@268d8c0ca0432bb2cf416faae41297df9d262d7f
+      uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753
       with:
         go-version: ${{ matrix.go-version }}
         check-latest: true
@@ -41,7 +41,7 @@ jobs:
       with:
         python-version: '3.x'
     - name: Install Mage
-      run: go install github.com/magefile/mage@07afc7d24f4d6d6442305d49552f04fbda5ccb3e
+      run: go install github.com/magefile/mage@v1.15.0
     - name: Install asciidoctor
       uses: reitzig/actions-asciidoctor@7570212ae20b63653481675fb1ff62d1073632b0
     - name: Install docutils
@@ -62,7 +62,7 @@ jobs:
     - run: pandoc -v
     - if: matrix.os == 'windows-latest'
       run: |
-        Choco-Install -PackageName mingw -ArgumentList "--version","10.2.0","--allow-downgrade"
+        Choco-Install -PackageName mingw -ArgumentList "--version","12.2.0","--allow-downgrade"
     - if: matrix.os == 'ubuntu-latest'
       name: Install dart-sass-embedded Linux
       run: |
@@ -86,9 +86,16 @@ jobs:
         curl -LJO "https://github.com/sass/dart-sass-embedded/releases/download/${env:DART_SASS_VERSION}/sass_embedded-${env:DART_SASS_VERSION}-windows-x64.zip";
         Expand-Archive -Path "sass_embedded-${env:DART_SASS_VERSION}-windows-x64.zip" -DestinationPath .;
         echo  "$env:GITHUB_WORKSPACE/sass_embedded/" | Out-File -FilePath $Env:GITHUB_PATH -Encoding utf-8 -Append
-    - name: Check
+    - if: matrix.os != 'windows-latest'
+      name: Check
       run: |
         mage -v check;
       env:
         HUGO_BUILD_TAGS: extended
-
+    - if: matrix.os == 'windows-latest'
+      # See issue #11052. We limit the build to regular test (no -race flag) on Windows for now.
+      name: Test
+      run: |
+        mage -v test;
+      env:
+        HUGO_BUILD_TAGS: extended