test.yml - hugo - [fork] hugo port for 9front
(HTM) git clone https://git.drkhsh.at/hugo.git
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) Submodules
(DIR) README
(DIR) LICENSE
---
test.yml (5182B)
---
1 on:
2 push:
3 branches: [master]
4 pull_request:
5 name: Test
6 env:
7 GOPROXY: https://proxy.golang.org
8 GO111MODULE: on
9 SASS_VERSION: 1.80.3
10 DART_SASS_SHA_LINUX: 7c933edbad0a7d389192c5b79393485c088bd2c4398e32f5754c32af006a9ffd
11 DART_SASS_SHA_MACOS: 79e060b0e131c3bb3c16926bafc371dc33feab122bfa8c01aa337a072097967b
12 DART_SASS_SHA_WINDOWS: 0bc4708b37cd1bac4740e83ac5e3176e66b774f77fd5dd364da5b5cfc9bfb469
13 permissions:
14 contents: read
15 jobs:
16 test:
17 strategy:
18 matrix:
19 go-version: [1.23.x, 1.24.x]
20 os: [ubuntu-latest, windows-latest] # macos disabled for now because of disk space issues.
21 runs-on: ${{ matrix.os }}
22 steps:
23 - if: matrix.os == 'ubuntu-latest'
24 name: Free Disk Space (Ubuntu)
25 uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1
26 with:
27 # this might remove tools that are actually needed,
28 # if set to "true" but frees about 6 GB
29 tool-cache: false
30 android: true
31 dotnet: true
32 haskell: true
33 large-packages: true
34 docker-images: true
35 swap-storage: true
36 - name: Checkout code
37 uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
38 - name: Install Go
39 uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
40 with:
41 go-version: ${{ matrix.go-version }}
42 check-latest: true
43 cache: true
44 cache-dependency-path: |
45 **/go.sum
46 **/go.mod
47 - name: Install Ruby
48 uses: ruby/setup-ruby@a6e6f86333f0a2523ece813039b8b4be04560854 # v1.190.0
49 with:
50 ruby-version: "2.7"
51 bundler-cache: true #
52 - name: Install Python
53 uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1
54 with:
55 python-version: "3.x"
56 - name: Install Mage
57 run: go install github.com/magefile/mage@v1.15.0
58 - name: Install asciidoctor
59 uses: reitzig/actions-asciidoctor@c642db5eedd1d729bb8c92034770d0b2f769eda6 # v2.0.2
60 - name: Install docutils
61 run: |
62 pip install docutils
63 rst2html --version
64 - if: matrix.os == 'ubuntu-latest'
65 name: Install pandoc on Linux
66 run: |
67 sudo apt-get update -y
68 sudo apt-get install -y pandoc
69 - if: matrix.os == 'macos-latest'
70 run: |
71 brew install pandoc
72 - if: matrix.os == 'windows-latest'
73 run: |
74 choco install pandoc
75 - run: pandoc -v
76 - if: matrix.os == 'windows-latest'
77 run: |
78 choco install mingw
79 - if: matrix.os == 'ubuntu-latest'
80 name: Install dart-sass Linux
81 run: |
82 echo "Install Dart Sass version ${SASS_VERSION} ..."
83 curl -LJO "https://github.com/sass/dart-sass/releases/download/${SASS_VERSION}/dart-sass-${SASS_VERSION}-linux-x64.tar.gz";
84 echo "${DART_SASS_SHA_LINUX} dart-sass-${SASS_VERSION}-linux-x64.tar.gz" | sha256sum -c;
85 tar -xvf "dart-sass-${SASS_VERSION}-linux-x64.tar.gz";
86 echo "$GOBIN"
87 echo "$GITHUB_WORKSPACE/dart-sass/" >> $GITHUB_PATH
88 - if: matrix.os == 'macos-latest'
89 name: Install dart-sass MacOS
90 run: |
91 echo "Install Dart Sass version ${SASS_VERSION} ..."
92 curl -LJO "https://github.com/sass/dart-sass/releases/download/${SASS_VERSION}/dart-sass-${SASS_VERSION}-macos-x64.tar.gz";
93 echo "${DART_SASS_SHA_MACOS} dart-sass-${SASS_VERSION}-macos-x64.tar.gz" | shasum -a 256 -c;
94 tar -xvf "dart-sass-${SASS_VERSION}-macos-x64.tar.gz";
95 echo "$GITHUB_WORKSPACE/dart-sass/" >> $GITHUB_PATH
96 - if: matrix.os == 'windows-latest'
97 name: Install dart-sass Windows
98 run: |
99 echo "Install Dart Sass version ${env:SASS_VERSION} ..."
100 curl -LJO "https://github.com/sass/dart-sass/releases/download/${env:SASS_VERSION}/dart-sass-${env:SASS_VERSION}-windows-x64.zip";
101 Expand-Archive -Path "dart-sass-${env:SASS_VERSION}-windows-x64.zip" -DestinationPath .;
102 echo "$env:GITHUB_WORKSPACE/dart-sass/" | Out-File -FilePath $Env:GITHUB_PATH -Encoding utf-8 -Append
103 - if: matrix.os == 'ubuntu-latest'
104 name: Install staticcheck
105 run: go install honnef.co/go/tools/cmd/staticcheck@latest
106 - if: matrix.os == 'ubuntu-latest'
107 name: Run staticcheck
108 run: staticcheck ./...
109 - if: matrix.os != 'windows-latest'
110 name: Check
111 run: |
112 sass --version;
113 mage -v check;
114 env:
115 HUGO_BUILD_TAGS: extended,withdeploy
116 - if: matrix.os == 'windows-latest'
117 # See issue #11052. We limit the build to regular test (no -race flag) on Windows for now.
118 name: Test
119 run: |
120 mage -v test;
121 env:
122 HUGO_BUILD_TAGS: extended,withdeploy
123 - name: Build tags
124 run: |
125 go install -tags extended
126 - if: matrix.os == 'ubuntu-latest'
127 name: Build for dragonfly
128 run: |
129 go install
130 env:
131 GOARCH: amd64
132 GOOS: dragonfly