Github Actions: a reusable hs-setup
action
#17
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "build" | |
on: | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- "test/html/**" | |
env: | |
GHC_VERSION: '9.4.8' | |
MANUAL_CACHE_RESET_BIN: v1 | |
MANUAL_CACHE_RESET_GHC: v0 | |
MANUAL_CACHE_RESET_STACK: v4 | |
jobs: | |
build: | |
name: Build Vado | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set all tracked file modification times to the time of their last commit | |
run: | | |
rev=HEAD | |
for f in $(git ls-tree -r -t --full-name --name-only "$rev") ; do | |
touch -d $(git log --pretty=format:%cI -1 "$rev" -- "$f") "$f"; | |
done | |
- uses: ./.github/actions/hs-setup | |
- run: stack build | |
test: | |
name: Test Vado | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set all tracked file modification times to the time of their last commit | |
run: | | |
rev=HEAD | |
for f in $(git ls-tree -r -t --full-name --name-only "$rev") ; do | |
touch -d $(git log --pretty=format:%cI -1 "$rev" -- "$f") "$f"; | |
done | |
- uses: ./.github/actions/hs-setup | |
- run: stack test --fast |