mirror of
https://github.com/ilyakooo0/streamly.git
synced 2024-09-11 08:25:40 +03:00
Move coverage tests to github
* Use minimal PATH
This commit is contained in:
parent
6194cc1c1e
commit
1330ea4447
@ -59,7 +59,7 @@ env: &env
|
|||||||
# If you have not committed packcheck.sh in your repo at PACKCHECK
|
# If you have not committed packcheck.sh in your repo at PACKCHECK
|
||||||
# then it is automatically pulled from this URL.
|
# then it is automatically pulled from this URL.
|
||||||
PACKCHECK_GITHUB_URL: "https://raw.githubusercontent.com/composewell/packcheck"
|
PACKCHECK_GITHUB_URL: "https://raw.githubusercontent.com/composewell/packcheck"
|
||||||
PACKCHECK_GITHUB_COMMIT: "8c77f80fd3a9df7307d06256c11a9e31d066475e"
|
PACKCHECK_GITHUB_COMMIT: "35efa99b2082d13722b8a0183ac6455df98e91b9"
|
||||||
|
|
||||||
executors:
|
executors:
|
||||||
amd64-executor:
|
amd64-executor:
|
||||||
@ -410,7 +410,7 @@ workflows:
|
|||||||
#- stack-ghc-8.2
|
#- stack-ghc-8.2
|
||||||
#- coveralls-ghc-8.2.2
|
#- coveralls-ghc-8.2.2
|
||||||
#- coveralls-ghc-8.8.3
|
#- coveralls-ghc-8.8.3
|
||||||
- coveralls-ghc-8_10_2:
|
#- coveralls-ghc-8_10_2:
|
||||||
name: GHC 8.10.2 + inspection + coverage + Werror
|
# name: GHC 8.10.2 + inspection + coverage + Werror
|
||||||
- hlint-src:
|
- hlint-src:
|
||||||
name: Hlint src
|
name: Hlint src
|
||||||
|
84
.github/workflows/haskell.yml
vendored
84
.github/workflows/haskell.yml
vendored
@ -10,40 +10,53 @@ jobs:
|
|||||||
build:
|
build:
|
||||||
name: GHC ${{ matrix.name }}
|
name: GHC ${{ matrix.name }}
|
||||||
env:
|
env:
|
||||||
CABAL_REINIT_CONFIG: y
|
# packcheck environment variables
|
||||||
LC_ALL: C.UTF-8
|
LC_ALL: C.UTF-8
|
||||||
|
|
||||||
ENABLE_INSTALL: "n"
|
|
||||||
|
|
||||||
STACK_UPGRADE: "y"
|
|
||||||
|
|
||||||
CABAL_CHECK_RELAX: y
|
|
||||||
CABAL_NO_SANDBOX: y
|
|
||||||
CABAL_HACKAGE_MIRROR: hackage.haskell.org:http://hackage.fpcomplete.com
|
|
||||||
|
|
||||||
PACKCHECK_LOCAL_PATH: "./packcheck.sh"
|
|
||||||
PACKCHECK_GITHUB_URL: "https://raw.githubusercontent.com/composewell/packcheck"
|
|
||||||
PACKCHECK_GITHUB_COMMIT: "8c77f80fd3a9df7307d06256c11a9e31d066475e"
|
|
||||||
|
|
||||||
BUILD: ${{ matrix.build }}
|
BUILD: ${{ matrix.build }}
|
||||||
GHCVER: ${{ matrix.ghc_version }}
|
GHCVER: ${{ matrix.ghc_version }}
|
||||||
RESOLVER: ${{ matrix.resolver }}
|
DISABLE_DOCS: ${{ matrix.disable_docs }}
|
||||||
|
DISABLE_TEST: ${{ matrix.disable_test }}
|
||||||
|
DISABLE_DIST_CHECKS: ${{ matrix.disable_dist_checks }}
|
||||||
|
SDIST_OPTIONS: ${{ matrix.sdist_options }}
|
||||||
|
DISABLE_SDIST_BUILD: ${{ matrix.disable_sdist_build }}
|
||||||
|
|
||||||
|
# Cabal options
|
||||||
|
CABAL_REINIT_CONFIG: y
|
||||||
CABAL_BUILD_OPTIONS: ${{ matrix.cabal_build_options }} --flag limit-build-mem
|
CABAL_BUILD_OPTIONS: ${{ matrix.cabal_build_options }} --flag limit-build-mem
|
||||||
CABAL_BUILD_TARGETS: ${{ matrix.cabal_build_targets }}
|
CABAL_BUILD_TARGETS: ${{ matrix.cabal_build_targets }}
|
||||||
CABAL_PROJECT: ${{ matrix.cabal_project }}
|
CABAL_PROJECT: ${{ matrix.cabal_project }}
|
||||||
|
CABAL_CHECK_RELAX: y
|
||||||
|
|
||||||
|
# Stack options
|
||||||
|
STACK_UPGRADE: "y"
|
||||||
|
RESOLVER: ${{ matrix.resolver }}
|
||||||
STACK_YAML: ${{ matrix.stack_yaml }}
|
STACK_YAML: ${{ matrix.stack_yaml }}
|
||||||
STACK_BUILD_OPTIONS: ${{ matrix.stack_build_options }}
|
STACK_BUILD_OPTIONS: ${{ matrix.stack_build_options }}
|
||||||
DISABLE_DOCS: ${{ matrix.disable_docs }}
|
|
||||||
DISABLE_TEST: ${{ matrix.disable_test }}
|
# packcheck location and revision
|
||||||
SDIST_OPTIONS: ${{ matrix.sdist_options }}
|
PACKCHECK_LOCAL_PATH: "./packcheck.sh"
|
||||||
DISABLE_SDIST_BUILD: ${{ matrix.disable_sdist_build }}
|
PACKCHECK_GITHUB_URL: "https://raw.githubusercontent.com/composewell/packcheck"
|
||||||
DISABLE_DIST_CHECKS: ${{ matrix.disable_dist_checks }}
|
PACKCHECK_GITHUB_COMMIT: "35efa99b2082d13722b8a0183ac6455df98e91b9"
|
||||||
|
|
||||||
|
# Pull token from "secrets" setting of the github repo
|
||||||
|
COVERALLS_TOKEN: ${{ secrets.COVERALLS_TOKEN }}
|
||||||
|
COVERAGE: ${{ matrix.coverage }}
|
||||||
|
|
||||||
runs-on: ${{ matrix.runner }}
|
runs-on: ${{ matrix.runner }}
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
name: [9.0.1, 8.10.4+stack+nightly-2021-06-10, 8.10.4+macOS, 8.8.4+inspection+fusion-plugin+Werror, 8.8.4, 8.6.5+fusion-plugin, 8.6.5+streamk, 8.4.4+debug, doctests]
|
name:
|
||||||
|
- 9.0.1
|
||||||
|
- 8.10.4+stack+nightly-2021-06-10
|
||||||
|
- 8.10.4+macOS
|
||||||
|
- 8.10.4+linux+coverage+cabal
|
||||||
|
- 8.8.4
|
||||||
|
- 8.8.4+inspection+fusion-plugin+Werror
|
||||||
|
- 8.6.5+fusion-plugin
|
||||||
|
- 8.6.5+streamk
|
||||||
|
- 8.4.4+debug
|
||||||
|
- doctests
|
||||||
cabal_version: ["3.4"]
|
cabal_version: ["3.4"]
|
||||||
include:
|
include:
|
||||||
- name: 9.0.1
|
- name: 9.0.1
|
||||||
@ -64,6 +77,10 @@ jobs:
|
|||||||
build: cabal-v2
|
build: cabal-v2
|
||||||
disable_sdist_build: "y"
|
disable_sdist_build: "y"
|
||||||
runner: macos-latest
|
runner: macos-latest
|
||||||
|
- name: 8.10.4+linux+coverage+cabal
|
||||||
|
ghc_version: 8.10.4
|
||||||
|
coverage: "y"
|
||||||
|
runner: ubuntu-latest
|
||||||
- name: 8.8.4+inspection+fusion-plugin+Werror
|
- name: 8.8.4+inspection+fusion-plugin+Werror
|
||||||
ghc_version: 8.8.4
|
ghc_version: 8.8.4
|
||||||
build: cabal-v2
|
build: cabal-v2
|
||||||
@ -102,6 +119,7 @@ jobs:
|
|||||||
cabal_build_options: "--flag doctests"
|
cabal_build_options: "--flag doctests"
|
||||||
cabal_build_targets: doctests
|
cabal_build_targets: doctests
|
||||||
disable_sdist_build: "y"
|
disable_sdist_build: "y"
|
||||||
|
disable_dist_checks: "y"
|
||||||
runner: ubuntu-latest
|
runner: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
@ -116,7 +134,8 @@ jobs:
|
|||||||
name: Cache ~/.cabal
|
name: Cache ~/.cabal
|
||||||
with:
|
with:
|
||||||
path: ~/.cabal
|
path: ~/.cabal
|
||||||
key: ${{ runner.os }}-${{ matrix.ghc_version }}-cabal
|
# Bump the key version to clear the cache
|
||||||
|
key: ${{ runner.os }}-${{ matrix.ghc_version }}-cabal-v1
|
||||||
|
|
||||||
- name: Download packcheck
|
- name: Download packcheck
|
||||||
run: |
|
run: |
|
||||||
@ -126,6 +145,23 @@ jobs:
|
|||||||
if test ! -e "$PACKCHECK_LOCAL_PATH"; then $CURL -sL -o "$PACKCHECK_LOCAL_PATH" $PACKCHECK_URL; fi;
|
if test ! -e "$PACKCHECK_LOCAL_PATH"; then $CURL -sL -o "$PACKCHECK_LOCAL_PATH" $PACKCHECK_URL; fi;
|
||||||
chmod +x $PACKCHECK_LOCAL_PATH
|
chmod +x $PACKCHECK_LOCAL_PATH
|
||||||
|
|
||||||
- name: Run packcheck
|
- name: Run tests
|
||||||
run: |
|
run: |
|
||||||
bash -c "$PACKCHECK_LOCAL_PATH $BUILD"
|
if test -z "$COVERAGE"
|
||||||
|
then
|
||||||
|
export TOOLS_DIR=/opt
|
||||||
|
# /usr/local/opt/curl/bin for macOS
|
||||||
|
export PATH=$HOME/.local/bin:$HOME/.ghcup/bin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/opt/curl/bin
|
||||||
|
bash -c "$PACKCHECK_LOCAL_PATH $BUILD"
|
||||||
|
else
|
||||||
|
# Run tests with coverage
|
||||||
|
cabal update
|
||||||
|
cabal user-config update -a "jobs: 1"
|
||||||
|
# Build hpc-coveralls if needed
|
||||||
|
sudo apt-get install -y libcurl4-gnutls-dev
|
||||||
|
export PATH=$HOME/.cabal/bin:$PATH
|
||||||
|
which hpc-coveralls 2>/dev/null || cabal install --project-file cabal.project.hpc-coveralls hpc-coveralls
|
||||||
|
# Run tests and upload results to coveralls.io
|
||||||
|
bin/test.sh --coverage --raw
|
||||||
|
hpc-coveralls --repo-token="$COVERALLS_TOKEN" --coverage-mode=StrictlyFullLines
|
||||||
|
fi
|
||||||
|
@ -44,8 +44,6 @@ environment:
|
|||||||
# cabal options
|
# cabal options
|
||||||
# ------------------------------------------------------------------------
|
# ------------------------------------------------------------------------
|
||||||
CABAL_CHECK_RELAX: "y"
|
CABAL_CHECK_RELAX: "y"
|
||||||
CABAL_NO_SANDBOX: "y"
|
|
||||||
CABAL_HACKAGE_MIRROR: "hackage.haskell.org:http://hackage.fpcomplete.com"
|
|
||||||
|
|
||||||
# ------------------------------------------------------------------------
|
# ------------------------------------------------------------------------
|
||||||
# Where to find the required tools
|
# Where to find the required tools
|
||||||
@ -64,7 +62,7 @@ environment:
|
|||||||
# If you have not committed packcheck.sh in your repo at PACKCHECK_LOCAL_PATH
|
# If you have not committed packcheck.sh in your repo at PACKCHECK_LOCAL_PATH
|
||||||
# then it is automatically pulled from this URL.
|
# then it is automatically pulled from this URL.
|
||||||
PACKCHECK_GITHUB_URL: "https://raw.githubusercontent.com/composewell/packcheck"
|
PACKCHECK_GITHUB_URL: "https://raw.githubusercontent.com/composewell/packcheck"
|
||||||
PACKCHECK_GITHUB_COMMIT: "8c77f80fd3a9df7307d06256c11a9e31d066475e"
|
PACKCHECK_GITHUB_COMMIT: "35efa99b2082d13722b8a0183ac6455df98e91b9"
|
||||||
|
|
||||||
# Override the temp directory to avoid sed escaping issues
|
# Override the temp directory to avoid sed escaping issues
|
||||||
# See https://github.com/haskell/cabal/issues/5386
|
# See https://github.com/haskell/cabal/issues/5386
|
||||||
|
@ -4,7 +4,7 @@ packages:
|
|||||||
|
|
||||||
package streamly
|
package streamly
|
||||||
ghc-options: -Werror
|
ghc-options: -Werror
|
||||||
flags: inspection
|
flag: inspection
|
||||||
coverage: true
|
coverage: true
|
||||||
|
|
||||||
package streamly-tests
|
package streamly-tests
|
||||||
|
Loading…
Reference in New Issue
Block a user