Minor updates to workflow.

This commit is contained in:
Wen Kokke 2021-09-01 20:43:54 +01:00
parent 638cbcdd00
commit b612ae8a39
No known key found for this signature in database
GPG key ID: 7EB7DBBCEB539DB8

View file

@ -6,13 +6,6 @@ jobs:
build: build:
runs-on: macOS-latest runs-on: macOS-latest
env:
# Use the GHC version installed by haskell/actions/setup
#
# NOTE: Makefile respects the STACK environment variable
#
STACK: stack --system-ghc --no-install-ghc
strategy: strategy:
matrix: matrix:
ghc: ['8.10.5'] ghc: ['8.10.5']
@ -20,19 +13,25 @@ jobs:
steps: steps:
# Checkout
- name: Checkout - name: Checkout
uses: actions/checkout@v2 uses: actions/checkout@v2
with: with:
submodules: true submodules: true
- name: Get Gem Installation Directory - name: Update stack.yaml
id: get-gemdir run: |
run: echo "::set-output name=gemdir::$(gem env gemdir)" stack config set system-ghc true
shell: bash stack config set install-ghc false
- uses: actions/cache@v2
name: Cache files # Setup & Cache Haskell
id: cache
- name: Cache Haskell
uses: actions/cache@v2
id: cache-haskell
with: with:
path: | path: |
~/.cabal ~/.cabal
@ -40,24 +39,45 @@ jobs:
~/.ghcup ~/.ghcup
~/.local ~/.local
~/.stack ~/.stack
${{ steps.get-gemdir.outputs.gemdir }}
$GITHUB_WORKSPACE/.stack-work $GITHUB_WORKSPACE/.stack-work
key: ${{ runner.os }}-${{ matrix.ghc }}-${{ matrix.agda }} key: ${{ runner.os }}-ghc-${{ matrix.ghc }}
- name: Setup Haskell - name: Setup Haskell
if: steps.cache.outputs.cache-hit != 'true' if: steps.cache-haskell.outputs.cache-hit != 'true'
uses: haskell/actions/setup@v1 uses: haskell/actions/setup@v1
with: with:
ghc-version: ${{ matrix.ghc }} ghc-version: ${{ matrix.ghc }}
enable-stack: true enable-stack: true
stack-version: 'latest'
# Setup & Cache HTMLProofer
- name: Get Gem Installation Directory
id: get-gemdir
run: echo "::set-output name=gemdir::$(gem env gemdir)"
shell: bash
- name: Get Ruby Version
id: get-ruby-version
run: echo "::set-output name=ruby-version::$(ruby -e 'puts RUBY_VERSION')"
shell: bash
- name: Setup HTMLProofer - name: Setup HTMLProofer
if: steps.cache.outputs.cache-hit != 'true' if: steps.cache-htmlproofer.outputs.cache-hit != 'true'
run: sudo gem install html-proofer run: sudo gem install html-proofer
- name: Build website - name: Cache HTMLProofer
uses: actions/cache@v2
id: cache-htmlproofer
with:
path: |
${{ steps.get-gemdir.outputs.gemdir }}
# Build & Test Website
- name: Build Website
run: make build run: make build
- name: Test website - name: Test Website
run: make test run: make test