github: Format GitHub actions files

This commit is contained in:
Bjørn Erik Pedersen 2024-04-14 13:10:43 +02:00
parent 09eb822822
commit e423e56273
2 changed files with 159 additions and 159 deletions

View file

@ -1,13 +1,13 @@
on: on:
push: push:
branches: [ master ] branches: [master]
pull_request: pull_request:
name: TestDartSassV1 name: TestDartSassV1
env: env:
GOPROXY: https://proxy.golang.org GOPROXY: https://proxy.golang.org
GO111MODULE: on GO111MODULE: on
DART_SASS_VERSION: 1.62.1 DART_SASS_VERSION: 1.62.1
DART_SASS_SHA_LINUX: 3574da75a7322a539034648b8ff84ff2cca162eb924d72b663d718cd3936f075 DART_SASS_SHA_LINUX: 3574da75a7322a539034648b8ff84ff2cca162eb924d72b663d718cd3936f075
permissions: permissions:
contents: read contents: read
jobs: jobs:
@ -18,56 +18,56 @@ jobs:
os: [ubuntu-latest] os: [ubuntu-latest]
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Checkout code - name: Checkout code
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
- name: Install Go - name: Install Go
uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753
with: with:
go-version: ${{ matrix.go-version }} go-version: ${{ matrix.go-version }}
check-latest: true check-latest: true
cache: true cache: true
cache-dependency-path: | cache-dependency-path: |
**/go.sum **/go.sum
**/go.mod **/go.mod
- name: Install Ruby - name: Install Ruby
uses: ruby/setup-ruby@036ef458ddccddb148a2b9fb67e95a22fdbf728b uses: ruby/setup-ruby@036ef458ddccddb148a2b9fb67e95a22fdbf728b
with: with:
ruby-version: '2.7' ruby-version: "2.7"
bundler-cache: true # bundler-cache: true #
- name: Install Python - name: Install Python
uses: actions/setup-python@3105fb18c05ddd93efea5f9e0bef7a03a6e9e7df uses: actions/setup-python@3105fb18c05ddd93efea5f9e0bef7a03a6e9e7df
with: with:
python-version: '3.x' python-version: "3.x"
- name: Install Mage - name: Install Mage
run: go install github.com/magefile/mage@v1.15.0 run: go install github.com/magefile/mage@v1.15.0
- name: Install asciidoctor - name: Install asciidoctor
uses: reitzig/actions-asciidoctor@7570212ae20b63653481675fb1ff62d1073632b0 uses: reitzig/actions-asciidoctor@7570212ae20b63653481675fb1ff62d1073632b0
- name: Install docutils - name: Install docutils
run: | run: |
pip install docutils pip install docutils
rst2html --version rst2html --version
- if: matrix.os == 'ubuntu-latest' - if: matrix.os == 'ubuntu-latest'
name: Install pandoc on Linux name: Install pandoc on Linux
run: | run: |
sudo apt-get update -y sudo apt-get update -y
sudo apt-get install -y pandoc sudo apt-get install -y pandoc
- if: matrix.os == 'macos-latest' - if: matrix.os == 'macos-latest'
run: | run: |
brew install pandoc brew install pandoc
- if: matrix.os == 'windows-latest' - if: matrix.os == 'windows-latest'
run: | run: |
Choco-Install -PackageName pandoc Choco-Install -PackageName pandoc
- run: pandoc -v - run: pandoc -v
- name: Install dart-sass-embedded Linux - name: Install dart-sass-embedded Linux
run: | run: |
echo "Install Dart Sass version ${DART_SASS_VERSION} ..." 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"; curl -LJO "https://github.com/sass/dart-sass-embedded/releases/download/${DART_SASS_VERSION}/sass_embedded-${DART_SASS_VERSION}-linux-x64.tar.gz";
echo "${DART_SASS_SHA_LINUX} sass_embedded-${DART_SASS_VERSION}-linux-x64.tar.gz" | sha256sum -c; echo "${DART_SASS_SHA_LINUX} sass_embedded-${DART_SASS_VERSION}-linux-x64.tar.gz" | sha256sum -c;
tar -xvf "sass_embedded-${DART_SASS_VERSION}-linux-x64.tar.gz"; tar -xvf "sass_embedded-${DART_SASS_VERSION}-linux-x64.tar.gz";
echo "$GITHUB_WORKSPACE/sass_embedded/" >> $GITHUB_PATH echo "$GITHUB_WORKSPACE/sass_embedded/" >> $GITHUB_PATH
- name: Check - name: Check
run: | run: |
dart-sass-embedded --version dart-sass-embedded --version
mage -v check; mage -v check;
env: env:
HUGO_BUILD_TAGS: extended HUGO_BUILD_TAGS: extended

View file

@ -1,119 +1,119 @@
on: on:
push: push:
branches: [ master ] branches: [master]
pull_request: pull_request:
name: Test name: Test
env: env:
GOPROXY: https://proxy.golang.org GOPROXY: https://proxy.golang.org
GO111MODULE: on GO111MODULE: on
SASS_VERSION: 1.63.2 SASS_VERSION: 1.63.2
DART_SASS_SHA_LINUX: 3ea33c95ad5c35fda6e9a0956199eef38a398f496cfb8750e02479d7d1dd42af DART_SASS_SHA_LINUX: 3ea33c95ad5c35fda6e9a0956199eef38a398f496cfb8750e02479d7d1dd42af
DART_SASS_SHA_MACOS: 11c70f259836b250b44a9cb57fed70e030f21f45069b467d371685855f1eb4f0 DART_SASS_SHA_MACOS: 11c70f259836b250b44a9cb57fed70e030f21f45069b467d371685855f1eb4f0
DART_SASS_SHA_WINDOWS: cd8cd36a619dd8e27f93d3186c52d70eb7d69472aa6c85f5094b29693e773f64 DART_SASS_SHA_WINDOWS: cd8cd36a619dd8e27f93d3186c52d70eb7d69472aa6c85f5094b29693e773f64
permissions: permissions:
contents: read contents: read
jobs: jobs:
test: test:
strategy: strategy:
matrix: matrix:
go-version: [1.21.x,1.22.x] go-version: [1.21.x, 1.22.x]
os: [ubuntu-latest, macos-latest, windows-latest] os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Checkout code - name: Checkout code
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
- name: Install Go - name: Install Go
uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753
with: with:
go-version: ${{ matrix.go-version }} go-version: ${{ matrix.go-version }}
check-latest: true check-latest: true
cache: true cache: true
cache-dependency-path: | cache-dependency-path: |
**/go.sum **/go.sum
**/go.mod **/go.mod
- name: Install Ruby - name: Install Ruby
uses: ruby/setup-ruby@036ef458ddccddb148a2b9fb67e95a22fdbf728b uses: ruby/setup-ruby@036ef458ddccddb148a2b9fb67e95a22fdbf728b
with: with:
ruby-version: '2.7' ruby-version: "2.7"
bundler-cache: true # bundler-cache: true #
- name: Install Python - name: Install Python
uses: actions/setup-python@3105fb18c05ddd93efea5f9e0bef7a03a6e9e7df uses: actions/setup-python@3105fb18c05ddd93efea5f9e0bef7a03a6e9e7df
with: with:
python-version: '3.x' python-version: "3.x"
- name: Install Mage - name: Install Mage
run: go install github.com/magefile/mage@v1.15.0 run: go install github.com/magefile/mage@v1.15.0
- name: Install asciidoctor - name: Install asciidoctor
uses: reitzig/actions-asciidoctor@7570212ae20b63653481675fb1ff62d1073632b0 uses: reitzig/actions-asciidoctor@7570212ae20b63653481675fb1ff62d1073632b0
- name: Install docutils - name: Install docutils
run: | run: |
pip install docutils pip install docutils
rst2html --version rst2html --version
- if: matrix.os == 'ubuntu-latest' - if: matrix.os == 'ubuntu-latest'
name: Install pandoc on Linux name: Install pandoc on Linux
run: | run: |
sudo apt-get update -y sudo apt-get update -y
sudo apt-get install -y pandoc sudo apt-get install -y pandoc
- if: matrix.os == 'macos-latest' - if: matrix.os == 'macos-latest'
run: | run: |
brew install pandoc brew install pandoc
- if: matrix.os == 'windows-latest' - if: matrix.os == 'windows-latest'
run: | run: |
choco install pandoc choco install pandoc
- run: pandoc -v - run: pandoc -v
- if: matrix.os == 'windows-latest' - if: matrix.os == 'windows-latest'
run: | run: |
choco install mingw choco install mingw
- if: matrix.os == 'ubuntu-latest' - if: matrix.os == 'ubuntu-latest'
name: Install dart-sass Linux name: Install dart-sass Linux
run: | run: |
echo "Install Dart Sass version ${SASS_VERSION} ..." echo "Install Dart Sass version ${SASS_VERSION} ..."
curl -LJO "https://github.com/sass/dart-sass/releases/download/${SASS_VERSION}/dart-sass-${SASS_VERSION}-linux-x64.tar.gz"; curl -LJO "https://github.com/sass/dart-sass/releases/download/${SASS_VERSION}/dart-sass-${SASS_VERSION}-linux-x64.tar.gz";
echo "${DART_SASS_SHA_LINUX} dart-sass-${SASS_VERSION}-linux-x64.tar.gz" | sha256sum -c; echo "${DART_SASS_SHA_LINUX} dart-sass-${SASS_VERSION}-linux-x64.tar.gz" | sha256sum -c;
tar -xvf "dart-sass-${SASS_VERSION}-linux-x64.tar.gz"; tar -xvf "dart-sass-${SASS_VERSION}-linux-x64.tar.gz";
echo "$GOBIN" echo "$GOBIN"
echo "$GITHUB_WORKSPACE/dart-sass/" >> $GITHUB_PATH echo "$GITHUB_WORKSPACE/dart-sass/" >> $GITHUB_PATH
- if: matrix.os == 'macos-latest' - if: matrix.os == 'macos-latest'
name: Install dart-sass MacOS name: Install dart-sass MacOS
run: | run: |
echo "Install Dart Sass version ${SASS_VERSION} ..." echo "Install Dart Sass version ${SASS_VERSION} ..."
curl -LJO "https://github.com/sass/dart-sass/releases/download/${SASS_VERSION}/dart-sass-${SASS_VERSION}-macos-x64.tar.gz"; curl -LJO "https://github.com/sass/dart-sass/releases/download/${SASS_VERSION}/dart-sass-${SASS_VERSION}-macos-x64.tar.gz";
echo "${DART_SASS_SHA_MACOS} dart-sass-${SASS_VERSION}-macos-x64.tar.gz" | shasum -a 256 -c; echo "${DART_SASS_SHA_MACOS} dart-sass-${SASS_VERSION}-macos-x64.tar.gz" | shasum -a 256 -c;
tar -xvf "dart-sass-${SASS_VERSION}-macos-x64.tar.gz"; tar -xvf "dart-sass-${SASS_VERSION}-macos-x64.tar.gz";
echo "$GITHUB_WORKSPACE/dart-sass/" >> $GITHUB_PATH echo "$GITHUB_WORKSPACE/dart-sass/" >> $GITHUB_PATH
- if: matrix.os == 'windows-latest' - if: matrix.os == 'windows-latest'
name: Install dart-sass Windows name: Install dart-sass Windows
run: | run: |
echo "Install Dart Sass version ${env:SASS_VERSION} ..." echo "Install Dart Sass version ${env:SASS_VERSION} ..."
curl -LJO "https://github.com/sass/dart-sass/releases/download/${env:SASS_VERSION}/dart-sass-${env:SASS_VERSION}-windows-x64.zip"; curl -LJO "https://github.com/sass/dart-sass/releases/download/${env:SASS_VERSION}/dart-sass-${env:SASS_VERSION}-windows-x64.zip";
Expand-Archive -Path "dart-sass-${env:SASS_VERSION}-windows-x64.zip" -DestinationPath .; Expand-Archive -Path "dart-sass-${env:SASS_VERSION}-windows-x64.zip" -DestinationPath .;
echo "$env:GITHUB_WORKSPACE/dart-sass/" | Out-File -FilePath $Env:GITHUB_PATH -Encoding utf-8 -Append echo "$env:GITHUB_WORKSPACE/dart-sass/" | Out-File -FilePath $Env:GITHUB_PATH -Encoding utf-8 -Append
- if: matrix.os == 'ubuntu-latest' - if: matrix.os == 'ubuntu-latest'
name: Install staticcheck name: Install staticcheck
run: go install honnef.co/go/tools/cmd/staticcheck@latest run: go install honnef.co/go/tools/cmd/staticcheck@latest
- if: matrix.os == 'ubuntu-latest' - if: matrix.os == 'ubuntu-latest'
name: Run staticcheck name: Run staticcheck
run: staticcheck ./... run: staticcheck ./...
- if: matrix.os != 'windows-latest' - if: matrix.os != 'windows-latest'
name: Check name: Check
run: | run: |
sass --version; sass --version;
mage -v check; mage -v check;
env: env:
HUGO_BUILD_TAGS: extended HUGO_BUILD_TAGS: extended
- if: matrix.os == 'windows-latest' - if: matrix.os == 'windows-latest'
# See issue #11052. We limit the build to regular test (no -race flag) on Windows for now. # See issue #11052. We limit the build to regular test (no -race flag) on Windows for now.
name: Test name: Test
run: | run: |
mage -v test; mage -v test;
env: env:
HUGO_BUILD_TAGS: extended HUGO_BUILD_TAGS: extended
- name: Build tags - name: Build tags
run: | run: |
go install -tags extended,nodeploy go install -tags extended,nodeploy
- if: matrix.os == 'ubuntu-latest' - if: matrix.os == 'ubuntu-latest'
name: Build for dragonfly name: Build for dragonfly
run: | run: |
go install go install
env: env:
GOARCH: amd64 GOARCH: amd64
GOOS: dragonfly GOOS: dragonfly