default: image: fpco/stack-build:lts-13.21 variables: STACK_ROOT: "${CI_PROJECT_DIR}/.stack" CHROME_BIN: "/usr/bin/chromium-browser" stages: - setup - frontend:build - yesod:build - test npm install: stage: setup script: - npm install before_script: &npm - apt-get update - npm install -g n - n stable cache: key: "${CI_COMMIT_REF_SLUG}" paths: - node_modules artifacts: paths: - node_modules/ name: "${CI_JOB_NAME}" expire_in: "1 day" frontend:build: stage: frontend:build script: - npm run frontend:build before_script: - *npm needs: - npm install artifacts: paths: - static/bundles/ name: "${CI_JOB_NAME}" expire_in: "1 day" dependencies: - npm install yesod:build:dev: stage: yesod:build script: - stack build --copy-bins --local-bin-path $(pwd)/bin --fast --flag uniworx:-library-only --flag uniworx:dev --flag uniworx:pedantic needs: - frontend:build before_script: - ln -s $(which g++-7) $(dirname $(which g++-7))/g++ cache: key: "${CI_COMMIT_REF_SLUG}" paths: - .stack - .stack_work artifacts: paths: - bin/uniworx name: "${CI_JOB_NAME}" expire_in: "1 week" dependencies: - frontend:build frontend:test: stage: test script: - npm run frontend:test needs: - frontend:build before_script: - *npm - apt-get install -y --no-install-recommends chromium-browser dependencies: - npm install