.gitlab-ci.yml 814 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
# Thanks to:
# https://vadosware.io/post/zero-to-continuous-integrated-testing-a-haskell-project-with-gitlab/
#
#
image: nixos/nix:latest

variables:
  STACK_ROOT: "${CI_PROJECT_DIR}/.stack-root"
  STACK_OPTS: "--system-ghc"

#before_script:
  #- apt-get update
  #- apt-get install make xz-utils

stages:
16
  - deps
17 18
  - test

19 20
deps:
  cache:
21
    paths:
22
      - /nix/store
23
      - node_modules/
24 25
  script:
    - nix-env -i git
26
    - nix-shell shell.nix --run 'yarn --skip-builds'
27

28 29 30 31
test:
  cache:
    # cache per branch name
    # key: ${CI_COMMIT_REF_SLUG}
32
    paths:
33
      - /nix/store
34
      - node_modules/
35
  script:
36
    # find 0.14.5 purescript version here:
37 38
    # https://lazamar.co.uk/nix-versions/
    - nix-env -i git
39
    - nix-shell shell.nix --run 'yarn --skip-builds'
40
    - nix-shell shell.nix --run test-ps