test.yml (3804B)
1 on: [push, pull_request] 2 name: Test 3 permissions: 4 contents: read 5 jobs: 6 test: 7 env: 8 GOPROXY: https://proxy.golang.org 9 GO111MODULE: on 10 strategy: 11 matrix: 12 # Note: We upgraded to Go 1.18 in Hugo v0.95.0 13 # Go 1.18 had some breaking changes on the source level which means Hugo cannot be built 14 # with older Go versions, but the improvements in Go 1.18 were too good to pass on (e.g. break and continue). 15 # Note that you don't need Go (or Go 1.18) to run a pre-built binary. 16 go-version: [1.18.x] 17 os: [ubuntu-latest, macos-latest, windows-latest] 18 runs-on: ${{ matrix.os }} 19 steps: 20 - name: Install Go 21 uses: actions/setup-go@37335c7bb261b353407cff977110895fa0b4f7d8 22 with: 23 go-version: ${{ matrix.go-version }} 24 - name: Install Ruby 25 uses: actions/setup-ruby@5f29a1cd8dfebf420691c4c9a0e832e2fae5a526 26 with: 27 ruby-version: '2.7' 28 - name: Install Python 29 uses: actions/setup-python@3105fb18c05ddd93efea5f9e0bef7a03a6e9e7df 30 with: 31 python-version: '3.x' 32 - name: Install Mage 33 run: go install github.com/magefile/mage@07afc7d24f4d6d6442305d49552f04fbda5ccb3e 34 - name: Install asciidoctor 35 uses: reitzig/actions-asciidoctor@7570212ae20b63653481675fb1ff62d1073632b0 36 - name: Checkout code 37 uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f 38 - name: Install docutils 39 run: | 40 pip install docutils 41 rst2html.py --version 42 - if: matrix.os == 'ubuntu-latest' 43 name: Install pandoc on Linux 44 run: | 45 sudo apt-get update -y 46 sudo apt-get install -y pandoc 47 - if: matrix.os == 'macos-latest' 48 run: | 49 brew install pandoc 50 - if: matrix.os == 'windows-latest' 51 run: | 52 choco install pandoc 53 - run: pandoc -v 54 - if: matrix.os == 'ubuntu-latest' 55 name: Install dart-sass-embedded Linux 56 run: | 57 curl -LJO https://github.com/sass/dart-sass-embedded/releases/download/1.0.0-beta.6/sass_embedded-1.0.0-beta.6-linux-x64.tar.gz; 58 echo "04fc1e5e28d29a4585a701941b6dace56771d94bfbe7f9e4db28d24417ceeec3 sass_embedded-1.0.0-beta.6-linux-x64.tar.gz" | sha256sum -c; 59 tar -xvf sass_embedded-1.0.0-beta.6-linux-x64.tar.gz; 60 echo "$GITHUB_WORKSPACE/sass_embedded/" >> $GITHUB_PATH 61 - if: matrix.os == 'macos-latest' 62 name: Install dart-sass-embedded MacOS 63 run: | 64 curl -LJO https://github.com/sass/dart-sass-embedded/releases/download/1.0.0-beta.6/sass_embedded-1.0.0-beta.6-macos-x64.tar.gz; 65 echo "b3b984675a9b04aa22f6f2302dda4191b507ac2ca124467db2dfe7e58e72fbad sass_embedded-1.0.0-beta.6-macos-x64.tar.gz" | shasum -a 256 -c; 66 tar -xvf sass_embedded-1.0.0-beta.6-macos-x64.tar.gz; 67 echo "$GITHUB_WORKSPACE/sass_embedded/" >> $GITHUB_PATH 68 - if: matrix.os == 'windows-latest' 69 name: Install dart-sass-embedded Windows 70 run: | 71 curl -LJO https://github.com/sass/dart-sass-embedded/releases/download/1.0.0-beta.6/sass_embedded-1.0.0-beta.6-windows-x64.zip; 72 echo "6ae442129dbb3334bc21ef851261da6c0c1b560da790ca2e1350871d00ab816d sass_embedded-1.0.0-beta.6-windows-x64.zip" | sha256sum -c; 73 unzip sass_embedded-1.0.0-beta.6-windows-x64.zip; 74 echo "$env:GITHUB_WORKSPACE/sass_embedded/" | Out-File -FilePath $Env:GITHUB_PATH -Encoding utf-8 -Append 75 - name: Check 76 run: | 77 mage -v check; 78 env: 79 HUGO_BUILD_TAGS: extended 80 - name: Build Docs 81 env: 82 HUGO_BUILD_TAGS: extended 83 HUGO_TIMEOUT: 31000 84 HUGO_IGNOREERRORS: error-remote-getjson 85 HUGO_SERVICES_INSTAGRAM_ACCESSTOKEN: dummytoken 86 run: | 87 mage -v hugo 88 ./hugo -s docs/ 89 ./hugo --renderToMemory -s docs/