mirror of
https://github.com/barrucadu/dejafu.git
synced 2024-11-23 14:14:36 +03:00
89e8495c77
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 2.3.4. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v2...v2.3.4) Signed-off-by: dependabot[bot] <support@github.com>
107 lines
2.9 KiB
YAML
107 lines
2.9 KiB
YAML
name: Run tests
|
|
|
|
on: pull_request
|
|
|
|
jobs:
|
|
lint:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2.3.4
|
|
- uses: haskell/actions/setup@v1.2.1
|
|
with:
|
|
enable-stack: true
|
|
- name: Setup
|
|
run: |
|
|
stack --no-terminal install stylish-haskell hlint
|
|
- name: Lint
|
|
run: |
|
|
set -ex
|
|
stack --no-terminal exec ./lint.sh
|
|
stack --no-terminal exec ./style.sh
|
|
git diff --exit-code
|
|
|
|
doctest:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2.3.4
|
|
- uses: haskell/actions/setup@v1.2.1
|
|
with:
|
|
enable-stack: true
|
|
- name: Setup
|
|
run: |
|
|
set -ex
|
|
stack --no-terminal setup
|
|
stack --no-terminal install doctest
|
|
- name: Build
|
|
run: |
|
|
stack --no-terminal build
|
|
- name: Test
|
|
run: |
|
|
stack --no-terminal exec -- bash -c "DEJAFU_DOCTEST=y doctest dejafu/Test"
|
|
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
resolver:
|
|
- lts-9.0 # ghc-8.0
|
|
- lts-10.0 # ghc-8.2
|
|
- lts-12.0 # ghc-8.4
|
|
- lts-13.3 # ghc-8.6
|
|
- lts-15.0 # ghc-8.8
|
|
- lts-17.0 # ghc-8.10
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2.3.4
|
|
- uses: haskell/actions/setup@v1.2.1
|
|
with:
|
|
enable-stack: true
|
|
- name: Setup
|
|
env:
|
|
RESOLVER: ${{ matrix.resolver }}
|
|
run: |
|
|
set -ex
|
|
if [[ "$RESOLVER" == "lts-9.0" ]]; then
|
|
# need an old stack version to build happy
|
|
mkdir -p ~/.local/bin
|
|
export PATH=$HOME/.local/bin:$PATH
|
|
curl -L https://github.com/commercialhaskell/stack/releases/download/v1.6.1/stack-1.6.1-linux-x86_64.tar.gz | \
|
|
tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'
|
|
|
|
# need hedgehog-0.5.2
|
|
cat <<EOF > stack.yaml
|
|
resolver: lts-9.0
|
|
|
|
packages:
|
|
- concurrency
|
|
- dejafu
|
|
- dejafu-tests
|
|
- hunit-dejafu
|
|
- tasty-dejafu
|
|
|
|
extra-deps:
|
|
- hedgehog-0.5.2
|
|
EOF
|
|
else
|
|
stack --no-terminal init --resolver="$RESOLVER" --force
|
|
fi
|
|
stack --no-terminal setup
|
|
- name: Build
|
|
env:
|
|
RESOLVER: ${{ matrix.resolver }}
|
|
run: |
|
|
if [[ "$RESOLVER" == "lts-9.0" ]]; then
|
|
export PATH=$HOME/.local/bin:$PATH
|
|
fi
|
|
stack --no-terminal build --ghc-options="-Werror -Wno-unused-imports"
|
|
- name: Test
|
|
env:
|
|
RESOLVER: ${{ matrix.resolver }}
|
|
run: |
|
|
if [[ "$RESOLVER" == "lts-9.0" ]]; then
|
|
export PATH=$HOME/.local/bin:$PATH
|
|
fi
|
|
cd dejafu-tests
|
|
stack --no-terminal exec -- dejafu-tests +RTS -s
|