refine Alloy false #114
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: Haskell CI | |
on: | |
push: | |
branches: | |
- dev | |
- master | |
pull_request: | |
branches: | |
- dev | |
- master | |
jobs: | |
build_and_test: | |
strategy: | |
matrix: | |
# os: [ubuntu-latest, macOS-latest, windows-latest] | |
os: [ubuntu-latest] | |
plan: | |
- {resolver: ""} | |
include: | |
- os: ubuntu-latest | |
apt-get: graphviz texlive-base texlive-latex-base | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Install ${{ matrix.os }} Packages | |
uses: mstksg/get-package@2a4b48d55d72d43ca89ae58ec9ca1397d34a1c35 | |
with: | |
apt-get: ${{ matrix.apt-get }} | |
- uses: actions/checkout@v4 | |
- name: Cache Stack on unix | |
id: cache-stack-unix | |
uses: actions/cache@v4 | |
with: | |
path: ~/.stack | |
key: ${{ runner.os }}-stack-global-${{ matrix.plan.resolver }}-${{ hashFiles('stack.yaml') }}-${{ hashFiles('package.yaml') }} | |
save-always: true | |
restore-keys: | | |
${{ runner.os }}-stack-global-${{ matrix.plan.resolver }}-${{ hashFiles('stack.yaml') }} | |
${{ runner.os }}-stack-global-${{ matrix.plan.resolver }} | |
${{ runner.os }}-stack-global- | |
if: contains(matrix.os, 'windows') == false | |
- name: Cache Stack on windows | |
id: cache-stack-windows | |
uses: actions/cache@v4 | |
with: | |
path: ~/AppData/Local/Programs/stack | |
key: ${{ runner.os }}-stack-global-${{ matrix.plan.resolver }}-${{ hashFiles('stack.yaml') }}-${{ hashFiles('package.yaml') }} | |
save-always: true | |
restore-keys: | | |
${{ runner.os }}-stack-global-${{ matrix.plan.resolver }}-${{ hashFiles('stack.yaml') }} | |
${{ runner.os }}-stack-global-${{ matrix.plan.resolver }} | |
${{ runner.os }}-stack-global- | |
if: contains(matrix.os, 'windows') | |
- uses: actions/cache@v4 | |
name: Cache .stack-work | |
with: | |
path: .stack-work | |
key: ${{ runner.os }}-stack-work-${{ matrix.plan.resolver }}-${{ hashFiles('stack.yaml') }}-${{ hashFiles('package.yaml') }}-${{ hashFiles('**/*.hs') }} | |
restore-keys: | | |
${{ runner.os }}-stack-work-${{ matrix.plan.resolver }}-${{ hashFiles('stack.yaml') }} | |
${{ runner.os }}-stack-work-${{ matrix.plan.resolver }} | |
${{ runner.os }}-stack-work- | |
- name: Setup stack | |
uses: haskell-actions/setup@v2 | |
with: | |
enable-stack: true | |
stack-no-global: true | |
- name: Install dependencies on unix | |
run: | | |
set -ex | |
# shellcheck disable=SC2086 | |
stack --no-terminal --install-ghc $ARGS test --stack-yaml=stack-apps.yaml --bench --only-dependencies | |
set +ex | |
env: | |
ARGS: ${{ matrix.plan.resolver }} | |
if: contains(matrix.os, 'windows') == false | |
- name: Install dependencies on windows | |
shell: powershell | |
run: | | |
stack --no-terminal --install-ghc ${env:ARGS} test --stack-yaml=stack-apps.yaml --bench --only-dependencies | |
env: | |
ARGS: ${{ matrix.plan.resolver }} | |
if: contains(matrix.os, 'windows') | |
- name: Build and test on unix | |
id: test-unix | |
run: | | |
set -ex | |
# shellcheck disable=SC2086 | |
stack --no-terminal $ARGS test --stack-yaml=stack-apps.yaml --coverage --bench --no-run-benchmarks --haddock --no-haddock-deps --test-arguments="--maximum-generated-tests=50" | |
set +ex | |
env: | |
ARGS: ${{ matrix.plan.resolver }} | |
if: contains(matrix.os, 'windows') == false | |
- name: Build and test on windows | |
id: test-windows | |
shell: powershell | |
run: | | |
stack --no-terminal ${env:ARGS} test --stack-yaml=stack-apps.yaml --coverage --bench --no-run-benchmarks --haddock --no-haddock-deps --test-arguments="--maximum-generated-tests=50" | |
env: | |
ARGS: ${{ matrix.plan.resolver }} | |
if: contains(matrix.os, 'windows') | |
- name: Archive test artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: test-results | |
path: artifacts | |
if: ${{ failure() && (steps.test-unix.conclusion == 'failure' || steps.test-windows.conclusion == 'failure') }} |