Skip to content

Commit

Permalink
github: Set HUGO_BUILD_TAGS: extended when running tests
Browse files Browse the repository at this point in the history
Also fix TestDecodeConfig/Basic which started to fail in the extended build in 0.99.1.

Closes #9935
  • Loading branch information
bep committed May 27, 2022
1 parent 6a5acd7 commit 52edea0
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 11 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/test.yml
Expand Up @@ -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
Expand Down
7 changes: 0 additions & 7 deletions magefile.go
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion modules/config_test.go
Expand Up @@ -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]]
Expand Down
Expand Up @@ -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 {"})
Expand Down

0 comments on commit 52edea0

Please sign in to comment.