aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2022-05-27 10:06:45 +0200
committerBjørn Erik Pedersen <[email protected]>2022-05-27 11:55:03 +0200
commit52edea0feccf98700300e98567c5a2ada7604c89 (patch)
treee09d89d3126aa910eb949331cfe244d3a5e02dba
parent6a5acd753abbd899547c89b369de71df639cce19 (diff)
downloadhugo-52edea0feccf98700300e98567c5a2ada7604c89.tar.gz
hugo-52edea0feccf98700300e98567c5a2ada7604c89.zip
github: Set HUGO_BUILD_TAGS: extended when running tests
Also fix TestDecodeConfig/Basic which started to fail in the extended build in 0.99.1. Closes #9935
-rw-r--r--.github/workflows/test.yml5
-rw-r--r--magefile.go7
-rw-r--r--modules/config_test.go2
-rw-r--r--resources/resource_transformers/tocss/scss/integration_test.go2
4 files changed, 5 insertions, 11 deletions
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 700c68882..1403c4d57 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -72,10 +72,11 @@ jobs:
echo "6ae442129dbb3334bc21ef851261da6c0c1b560da790ca2e1350871d00ab816d sass_embedded-1.0.0-beta.6-windows-x64.zip" | sha256sum -c;
unzip sass_embedded-1.0.0-beta.6-windows-x64.zip;
echo "$env:GITHUB_WORKSPACE/sass_embedded/" | Out-File -FilePath $Env:GITHUB_PATH -Encoding utf-8 -Append
- - name: Test
+ - name: Check
run: |
- mage -v test
mage -v check;
+ env:
+ HUGO_BUILD_TAGS: extended
- name: Build Docs
env:
HUGO_BUILD_TAGS: extended
diff --git a/magefile.go b/magefile.go
index b63576c3c..b2dc54777 100644
--- a/magefile.go
+++ b/magefile.go
@@ -144,13 +144,6 @@ func Docker() error {
// Run tests and linters
func Check() {
- if strings.Contains(runtime.Version(), "1.8") {
- // Go 1.8 doesn't play along with go test ./... and /vendor.
- // We could fix that, but that would take time.
- fmt.Printf("Skip Check on %s\n", runtime.Version())
- return
- }
-
if runtime.GOARCH == "amd64" && runtime.GOOS != "darwin" {
mg.Deps(Test386)
} else {
diff --git a/modules/config_test.go b/modules/config_test.go
index 55d055dcc..371aab056 100644
--- a/modules/config_test.go
+++ b/modules/config_test.go
@@ -48,7 +48,7 @@ func TestDecodeConfig(t *testing.T) {
[module.hugoVersion]
min = "0.54.2"
-max = "0.99.0"
+max = "0.199.0"
extended = true
[[module.mounts]]
diff --git a/resources/resource_transformers/tocss/scss/integration_test.go b/resources/resource_transformers/tocss/scss/integration_test.go
index 72c0fd988..13b664cc7 100644
--- a/resources/resource_transformers/tocss/scss/integration_test.go
+++ b/resources/resource_transformers/tocss/scss/integration_test.go
@@ -236,7 +236,7 @@ T1: {{ $r.Content }}
}).BuildE()
b.Assert(err, qt.IsNotNil)
- b.Assert(err.Error(), qt.Contains, filepath.FromSlash(`assets/scss/components/_foo.scss:2:1": expected ':' after $foocolor in assignment statement`))
+ b.Assert(err.Error(), qt.Contains, `assets/scss/components/_foo.scss:2:1": expected ':' after $foocolor in assignment statement`)
fe := b.AssertIsFileError(err)
b.Assert(fe.ErrorContext(), qt.IsNotNil)
b.Assert(fe.ErrorContext().Lines, qt.DeepEquals, []string{"/* comment line 1 */", "$foocolor #ccc;", "", "foo {"})