2022-10-25 10:08:41 -04:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [ master ]
|
|
|
|
pull_request:
|
2020-12-23 03:26:23 -05:00
|
|
|
name: Test
|
2022-12-02 03:18:47 -05:00
|
|
|
env:
|
2022-12-02 03:26:38 -05:00
|
|
|
GOPROXY: https://proxy.golang.org
|
|
|
|
GO111MODULE: on
|
2022-12-13 10:09:48 -05:00
|
|
|
DART_SASS_VERSION: 1.56.2
|
|
|
|
DART_SASS_SHA_LINUX: 9e4f455f7b8619959d7878af2862383be58392eb963a14ff87cc512c03701e2a
|
|
|
|
DART_SASS_SHA_MACOS: 5992e979e2c30ec363f8e338822bb2b4443c74232b3340501a76180f5652cb09
|
|
|
|
DART_SASS_SHA_WINDOWS: 8d3d9117c54840e3e6a4919e43acf75ea52f28a64fc87a8e29d80ec72ee36cfb
|
2022-05-03 03:23:47 -04:00
|
|
|
permissions:
|
|
|
|
contents: read
|
2020-12-23 03:26:23 -05:00
|
|
|
jobs:
|
|
|
|
test:
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2023-02-06 02:57:30 -05:00
|
|
|
go-version: [1.19.x,1.20.x]
|
2020-12-23 03:26:23 -05:00
|
|
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
steps:
|
2022-10-05 07:04:36 -04:00
|
|
|
- name: Checkout code
|
2022-10-05 10:37:37 -04:00
|
|
|
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
|
2020-12-23 03:26:23 -05:00
|
|
|
- name: Install Go
|
2022-10-05 10:37:37 -04:00
|
|
|
uses: actions/setup-go@268d8c0ca0432bb2cf416faae41297df9d262d7f
|
2020-12-23 03:26:23 -05:00
|
|
|
with:
|
|
|
|
go-version: ${{ matrix.go-version }}
|
2022-10-05 07:04:36 -04:00
|
|
|
check-latest: true
|
2022-10-04 20:09:39 -04:00
|
|
|
cache: true
|
2022-10-05 07:04:36 -04:00
|
|
|
cache-dependency-path: |
|
|
|
|
**/go.sum
|
|
|
|
**/go.mod
|
2020-12-23 03:26:23 -05:00
|
|
|
- name: Install Ruby
|
2022-12-11 12:56:01 -05:00
|
|
|
uses: ruby/setup-ruby@ee2113536afb7f793eed4ce60e8d3b26db912da4
|
2020-12-23 03:26:23 -05:00
|
|
|
with:
|
2022-12-11 12:56:01 -05:00
|
|
|
ruby-version: '2.7'
|
|
|
|
bundler-cache: true #
|
2020-12-23 03:26:23 -05:00
|
|
|
- name: Install Python
|
|
|
|
uses: actions/setup-python@3105fb18c05ddd93efea5f9e0bef7a03a6e9e7df
|
|
|
|
with:
|
|
|
|
python-version: '3.x'
|
|
|
|
- name: Install Mage
|
2022-03-16 05:41:08 -04:00
|
|
|
run: go install github.com/magefile/mage@07afc7d24f4d6d6442305d49552f04fbda5ccb3e
|
2020-12-23 03:26:23 -05:00
|
|
|
- name: Install asciidoctor
|
|
|
|
uses: reitzig/actions-asciidoctor@7570212ae20b63653481675fb1ff62d1073632b0
|
|
|
|
- name: Install docutils
|
|
|
|
run: |
|
|
|
|
pip install docutils
|
|
|
|
rst2html.py --version
|
|
|
|
- if: matrix.os == 'ubuntu-latest'
|
|
|
|
name: Install pandoc on Linux
|
|
|
|
run: |
|
|
|
|
sudo apt-get update -y
|
|
|
|
sudo apt-get install -y pandoc
|
|
|
|
- if: matrix.os == 'macos-latest'
|
|
|
|
run: |
|
|
|
|
brew install pandoc
|
|
|
|
- if: matrix.os == 'windows-latest'
|
|
|
|
run: |
|
2022-08-14 02:52:23 -04:00
|
|
|
Choco-Install -PackageName pandoc
|
2020-12-23 03:26:23 -05:00
|
|
|
- run: pandoc -v
|
2022-08-14 02:52:23 -04:00
|
|
|
- if: matrix.os == 'windows-latest'
|
|
|
|
run: |
|
|
|
|
Choco-Install -PackageName mingw -ArgumentList "--version","10.2.0","--allow-downgrade"
|
2020-12-23 03:26:23 -05:00
|
|
|
- if: matrix.os == 'ubuntu-latest'
|
|
|
|
name: Install dart-sass-embedded Linux
|
|
|
|
run: |
|
2022-12-02 03:26:38 -05:00
|
|
|
echo "Install Dart Sass version ${DART_SASS_VERSION} ..."
|
|
|
|
curl -LJO "https://github.com/sass/dart-sass-embedded/releases/download/${DART_SASS_VERSION}/sass_embedded-${DART_SASS_VERSION}-linux-x64.tar.gz";
|
2022-12-02 03:18:47 -05:00
|
|
|
echo "${DART_SASS_SHA_LINUX} sass_embedded-${DART_SASS_VERSION}-linux-x64.tar.gz" | sha256sum -c;
|
2022-12-02 03:26:38 -05:00
|
|
|
tar -xvf "sass_embedded-${DART_SASS_VERSION}-linux-x64.tar.gz";
|
2020-12-23 03:26:23 -05:00
|
|
|
echo "$GITHUB_WORKSPACE/sass_embedded/" >> $GITHUB_PATH
|
|
|
|
- if: matrix.os == 'macos-latest'
|
|
|
|
name: Install dart-sass-embedded MacOS
|
|
|
|
run: |
|
2022-12-02 03:26:38 -05:00
|
|
|
echo "Install Dart Sass version ${DART_SASS_VERSION} ..."
|
|
|
|
curl -LJO "https://github.com/sass/dart-sass-embedded/releases/download/${DART_SASS_VERSION}/sass_embedded-${DART_SASS_VERSION}-macos-x64.tar.gz";
|
|
|
|
echo "${DART_SASS_SHA_MACOS} sass_embedded-${DART_SASS_VERSION}-macos-x64.tar.gz" | shasum -a 256 -c;
|
|
|
|
tar -xvf "sass_embedded-${DART_SASS_VERSION}-macos-x64.tar.gz";
|
2020-12-23 03:26:23 -05:00
|
|
|
echo "$GITHUB_WORKSPACE/sass_embedded/" >> $GITHUB_PATH
|
|
|
|
- if: matrix.os == 'windows-latest'
|
|
|
|
name: Install dart-sass-embedded Windows
|
|
|
|
run: |
|
2022-12-02 03:26:38 -05:00
|
|
|
echo "Install Dart Sass version ${env:DART_SASS_VERSION} ..."
|
|
|
|
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 .;
|
2020-12-23 03:26:23 -05:00
|
|
|
echo "$env:GITHUB_WORKSPACE/sass_embedded/" | Out-File -FilePath $Env:GITHUB_PATH -Encoding utf-8 -Append
|
2022-05-27 04:06:45 -04:00
|
|
|
- name: Check
|
2020-12-23 03:26:23 -05:00
|
|
|
run: |
|
|
|
|
mage -v check;
|
2022-05-27 04:06:45 -04:00
|
|
|
env:
|
|
|
|
HUGO_BUILD_TAGS: extended
|
2023-05-17 16:14:15 -04:00
|
|
|
|