Allow with custom cabal path #35
Workflow file for this run
This file contains hidden or 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: ci | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
schedule: | |
# Every day at 00:00 UTC. | |
# | |
# https://crontab.guru | |
- cron: '0 0 * * *' | |
workflow_dispatch: | |
jobs: | |
cabal: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- "macos-latest" | |
- "ubuntu-latest" | |
- "windows-latest" | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: haskell-actions/setup@v2 | |
with: | |
ghc-version: "9.10.2" | |
- name: Configure | |
run: | | |
cabal configure --enable-tests --ghc-options -Werror | |
- name: Build executable | |
run: cabal build clc-stackage | |
- name: Unit Tests | |
id: unit | |
run: cabal test unit | |
- name: Functional Tests | |
id: functional | |
# We want to run these tests even if the unit tests fail, because | |
# it is useful to know if e.g. the unit tests fail due to one | |
# stackage endpoint failing, but the functional tests pass due to | |
# a backup working. | |
if: always() | |
shell: bash | |
run: NO_CLEANUP=1 cabal test functional | |
- name: Print functional failures | |
if: ${{ failure() && steps.functional.conclusion == 'failure' }} | |
shell: bash | |
run: | | |
if [[ ! -d output/logs ]]; then | |
echo "*** No output ***" | |
else | |
cd output/logs | |
for dir in */; do | |
echo "*** $d stdout ***" | |
cat "$dir/stdout.log" | |
echo "*** $d stderr ***" | |
cat "$dir/stderr.log" | |
done | |
fi |