From 04d40b6a09c2ccc5141d24926f5bd8bdaa01bcfd Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Mon, 17 Aug 2020 12:47:04 +0200 Subject: [PATCH] chore: unify stack build steps & provide postgres for testing --- .gitlab-ci.yml | 48 +++++++++--------------------------------------- 1 file changed, 9 insertions(+), 39 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 97418eafc..64f6d7ef5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -82,9 +82,13 @@ frontend:lint: interruptible: true yesod:build:dev: + services: + - name: postgres:10.10 + alias: postgres + stage: yesod:build script: - - stack build --copy-bins --local-bin-path $(pwd)/bin --fast --flag uniworx:-library-only --flag uniworx:dev --flag uniworx:pedantic + - stack build --test --copy-bins --local-bin-path $(pwd)/bin --fast --flag uniworx:-library-only --flag uniworx:dev --flag uniworx:pedantic needs: - frontend:build before_script: &haskell @@ -110,6 +114,10 @@ yesod:build:dev: interruptible: true yesod:build: + services: + - name: postgres:10.10 + alias: postgres + stage: yesod:build script: - stack build --test --copy-bins --local-bin-path $(pwd)/bin --flag uniworx:-library-only --flag uniworx:-dev --flag uniworx:pedantic @@ -151,44 +159,6 @@ frontend:test: retry: 2 interruptible: true -hlint:dev: - stage: lint - script: - - stack test --fast --flag uniworx:-library-only --flag uniworx:dev --flag uniworx:pedantic uniworx:test:hlint - needs: - - frontend:build - - yesod:build:dev # For caching - before_script: *haskell - dependencies: - - frontend:build - - only: - variables: - - $CI_COMMIT_REF_NAME !~ /^v[0-9].*/ - retry: 2 - interruptible: true - -yesod:test:dev: - services: - - name: postgres:10.10 - alias: postgres - - stage: test - script: - - stack test --coverage --fast --flag uniworx:-library-only --flag uniworx:dev --flag uniworx:pedantic --skip hlint - needs: - - frontend:build - - yesod:build:dev # For caching - before_script: *haskell - dependencies: - - frontend:build - - only: - variables: - - $CI_COMMIT_REF_NAME !~ /^v[0-9].*/ - retry: 2 - interruptible: true - deploy:uniworx3: stage: deploy script: