Skip to content

Simplify Application arguments #301

Simplify Application arguments

Simplify Application arguments #301

Workflow file for this run

---
name: Haskell CI
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions: read-all
jobs:
build_and_test:
strategy:
matrix:
os:
- ubuntu-latest
plan:
- {build: stack}
include:
- os: ubuntu-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Cache Stack
id: cache-stack-unix
uses: actions/cache@v4
with:
path: ~/.stack
key: ${{ matrix.os }}-${{ matrix.plan.build }}-stack-home-${{ hashFiles('stack.yaml') }}-${{ hashFiles('**/package.yaml') }}
- name: Setup stack
uses: haskell-actions/setup@v2
with:
enable-stack: true
stack-no-global: true
- name: Install dependencies
run: |
set -ex
stack --no-terminal --install-ghc build --test --bench --only-dependencies -w run.yaml
set +ex
env:
BUILD: ${{ matrix.plan.build }}
- name: Build and test
run: |
set -ex
stack --no-terminal test --coverage --bench --no-run-benchmarks --haddock --no-haddock-deps -w run.yaml
set +ex
env:
BUILD: ${{ matrix.plan.build }}
- name: Validate examples
run: |
set -ex
while IFS= read -r -d '' f; do
stack run -w run.yaml "$(basename "$f")" solution
done < <(find examples/configs -type f -name '*.hs' -print0)
set +ex
env:
BUILD: ${{ matrix.plan.build }}