-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
39 lines (34 loc) · 1.19 KB
/
azure-pipelines.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# This is a simple Azure configuration, which is intended for use
# on applications which do not require cross-platform and
# multiple-GHC-version support. For more information and other
# options, see:
#
# https://docs.haskellstack.org/en/stable/azure_ci/
#
# Copy these contents into the root directory of your Github project in a file
# named azure-pipelines.yml
variables:
STACK_CACHE_FOLDER: /home/vsts/.stack
# Choose a agent virtual image
pool:
vmImage: ubuntu-16.04
steps:
- task: Cache@2
inputs:
key: 'stack | "$(Agent.OS)" | package.yaml | stack.yaml'
path: $(STACK_CACHE_FOLDER)
restoreKeys: 'stack | "$(AGENT.OS)"'
displayName: Cache .stack
- script: |
mkdir -p ~/.local/bin
curl -L https://get.haskellstack.org/stable/linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'
displayName: Install Stack
- script: |
export PATH=$HOME/.local/bin:$PATH
stack --no-terminal --install-ghc test --only-dependencies
displayName: Build Dependencies
- script: |
export PATH=$HOME/.local/bin:$PATH
# Build the package, its tests, and its docs and run the tests
stack test --haddock --no-haddock-deps
displayName: Test Package