Skip to content

Redo SingleChoiceSelection for better differentiation between required and optional selections #926

Redo SingleChoiceSelection for better differentiation between required and optional selections

Redo SingleChoiceSelection for better differentiation between required and optional selections #926

Workflow file for this run

---
name: Haskell CI
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: write
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
set +ex
env:
BUILD: ${{ matrix.plan.build }}
- name: Build and test
run: |
set -ex
export FLEX_PKGDB=$(stack path --local-pkg-db)
stack --no-terminal test --coverage --bench --no-run-benchmarks --haddock --no-haddock-deps
set +ex
env:
BUILD: ${{ matrix.plan.build }}
- name: Escape commit message
id: escape
if: ${{ github.ref_name == github.event.repository.default_branch }}
env:
COMMIT_MSG: ${{ github.event.head_commit.message }}
run: |
echo "commit_msg=$(echo "$COMMIT_MSG" | jq -Rs '.|rtrimstr("\n")')" >> "$GITHUB_OUTPUT"
- name: Trigger Test-Flex
if: ${{ github.ref_name == github.event.repository.default_branch }}
uses: peter-evans/repository-dispatch@v3
with:
event-type: CI-Completed
client-payload: '{"sha": "${{ github.sha }}", "message": ${{ steps.escape.outputs.commit_msg }}}'