Skip to content

postcondition is Property #344

postcondition is Property

postcondition is Property #344

Workflow file for this run

name: "CI"
on:
push:
branches:
- main
pull_request:
jobs:
build-test:
name: "Build & test"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.1
with:
repository: input-output-hk/quickcheck-dynamic
# On pull_request events, we want to check out the latest commit of the
# PR, which is different to github.ref (the default, which would point
# to a "fake merge" commit). On push events, the default is fine as it
# refers to the pushed commit.
ref: ${{ github.event.pull_request.head.sha || github.ref }}
# Also ensure we have all history with all tags
fetch-depth: 0
- name: Prepare nix
uses: cachix/install-nix-action@v22
with:
extra_nix_config: |
accept-flake-config = true
log-lines = 1000
- name: Github cache ~/.cabal/packages, ~/.cabal/store and dist-newstyle
uses: actions/cache@v2.1.5
with:
path: |
~/.cabal/packages
~/.cabal/store
dist-newstyle
key: |
cabal-${{ runner.os }}-${{ hashFiles('cabal.project', 'default.nix', 'shell.nix') }}
restore-keys: |
cabal-${{ runner.os }}-${{ hashFiles('cabal.project', 'default.nix', 'shell.nix') }}
- name: Prepare nix shell
run:
nix develop --accept-flake-config --build
- name: Build
run: |
nix develop --accept-flake-config --command cabal update
nix develop --accept-flake-config --command cabal build all --ghc-options=-Werror
- name: Test
run:
nix develop --accept-flake-config --command cabal test all
- name: Formatting
run:
nix develop --accept-flake-config --command fourmolu --mode check .
haddock:
name: "Haddock & benchmarks"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.1
with:
repository: input-output-hk/quickcheck-dynamic
- name: Prepare nix
uses: cachix/install-nix-action@v22
with:
extra_nix_config: |
accept-flake-config = true
- name: Github cache ~/.cabal/packages, ~/.cabal/store and dist-newstyle
uses: actions/cache@v2.1.5
with:
path: |
~/.cabal/packages
~/.cabal/store
dist-newstyle
key: |
cabal-${{ runner.os }}-${{ hashFiles('cabal.project', 'default.nix', 'shell.nix') }}
- name: Documentation (Haddock)
run: |
nix develop --accept-flake-config --command .github/workflows/ci-haddock.sh
- name: Upload build & test artifacts
uses: actions/upload-artifact@v2
with:
name: haddocks
path: ./docs
documentation:
name: Documentation
needs: [haddock]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.1
with:
repository: input-output-hk/quickcheck-dynamic
- name: Download generated documentation
uses: actions/download-artifact@v3
with:
name: haddocks
path: docs
- name: Publish Documentation
if: github.event_name == 'push'
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN || github.token }}
publish_dir: docs/
enable_jekyll: true
force_orphan: true