chore(gitlab-ci): separate running of tests
This commit is contained in:
parent
5c83ff9932
commit
dfb0cd2262
138
.gitlab-ci.yml
138
.gitlab-ci.yml
@ -97,16 +97,11 @@ frontend:lint:
|
|||||||
interruptible: true
|
interruptible: true
|
||||||
|
|
||||||
yesod:build:dev:
|
yesod:build:dev:
|
||||||
services: &build-services
|
|
||||||
- name: postgres:10.10
|
|
||||||
alias: postgres
|
|
||||||
- name: minio/minio:RELEASE.2020-08-27T05-16-20Z
|
|
||||||
alias: minio
|
|
||||||
command: ["minio", "server", "/data"]
|
|
||||||
|
|
||||||
stage: yesod:build
|
stage: yesod:build
|
||||||
script:
|
script:
|
||||||
- stack build --test --copy-bins --local-bin-path $(pwd)/bin --fast --flag uniworx:-library-only --flag uniworx:dev --flag uniworx:pedantic --no-strip
|
- stack build --test --copy-bins --local-bin-path $(pwd)/bin --fast --flag uniworx:-library-only --flag uniworx:dev --flag uniworx:pedantic --no-strip --no-run-tests
|
||||||
|
- cp $(stack path --dist-dir)/build/hlint/hlint bin/test-hlint
|
||||||
|
- cp $(stack path --dist-dir)/build/yesod/yesod bin/test-yesod
|
||||||
needs:
|
needs:
|
||||||
- job: npm install # transitive
|
- job: npm install # transitive
|
||||||
artifacts: false
|
artifacts: false
|
||||||
@ -134,17 +129,17 @@ yesod:build:dev:
|
|||||||
- if: $CI_COMMIT_REF_NAME =~ /(^v[0-9].*)|((^|\/)profile($|\/))/
|
- if: $CI_COMMIT_REF_NAME =~ /(^v[0-9].*)|((^|\/)profile($|\/))/
|
||||||
when: manual
|
when: manual
|
||||||
allow_failure: true
|
allow_failure: true
|
||||||
- when: always
|
- when: on_success
|
||||||
|
|
||||||
retry: 2
|
retry: 2
|
||||||
interruptible: true
|
interruptible: true
|
||||||
|
|
||||||
yesod:build:
|
yesod:build:
|
||||||
services: *build-services
|
|
||||||
|
|
||||||
stage: yesod:build
|
stage: yesod:build
|
||||||
script:
|
script:
|
||||||
- stack build --test --copy-bins --local-bin-path $(pwd)/bin --flag uniworx:-library-only --flag uniworx:-dev --flag uniworx:pedantic --no-strip
|
- stack build --test --copy-bins --local-bin-path $(pwd)/bin --flag uniworx:-library-only --flag uniworx:-dev --flag uniworx:pedantic --no-strip --no-run-tests
|
||||||
|
- cp $(stack path --dist-dir)/build/hlint/hlint bin/test-hlint
|
||||||
|
- cp $(stack path --dist-dir)/build/yesod/yesod bin/test-yesod
|
||||||
needs:
|
needs:
|
||||||
- job: npm install # transitive
|
- job: npm install # transitive
|
||||||
artifacts: false
|
artifacts: false
|
||||||
@ -158,7 +153,7 @@ yesod:build:
|
|||||||
|
|
||||||
rules:
|
rules:
|
||||||
- if: $CI_COMMIT_REF_NAME =~ /^v[0-9].*/
|
- if: $CI_COMMIT_REF_NAME =~ /^v[0-9].*/
|
||||||
when: always
|
when: on_success
|
||||||
- when: manual
|
- when: manual
|
||||||
allow_failure: true
|
allow_failure: true
|
||||||
|
|
||||||
@ -187,7 +182,7 @@ yesod:build:profile:
|
|||||||
|
|
||||||
rules:
|
rules:
|
||||||
- if: $CI_COMMIT_REF_NAME =~ /(^|\/)profile($|\/)/
|
- if: $CI_COMMIT_REF_NAME =~ /(^|\/)profile($|\/)/
|
||||||
when: always
|
when: on_success
|
||||||
- when: manual
|
- when: manual
|
||||||
allow_failure: true
|
allow_failure: true
|
||||||
|
|
||||||
@ -195,6 +190,107 @@ yesod:build:profile:
|
|||||||
interruptible: true
|
interruptible: true
|
||||||
resource_group: ram
|
resource_group: ram
|
||||||
|
|
||||||
|
yesod:test:yesod:
|
||||||
|
stage: test
|
||||||
|
cache: {}
|
||||||
|
|
||||||
|
services: &test-services
|
||||||
|
- name: postgres:10.10
|
||||||
|
alias: postgres
|
||||||
|
- name: minio/minio:RELEASE.2020-08-27T05-16-20Z
|
||||||
|
alias: minio
|
||||||
|
command: ["minio", "server", "/data"]
|
||||||
|
|
||||||
|
needs:
|
||||||
|
- job: npm install # transitive
|
||||||
|
artifacts: false
|
||||||
|
- job: frontend:build #transitive
|
||||||
|
artifacts: false
|
||||||
|
- job: yesod:build
|
||||||
|
artifacts: true
|
||||||
|
|
||||||
|
rules:
|
||||||
|
- if: $CI_COMMIT_REF_NAME =~ /^v[0-9].*/
|
||||||
|
when: on_success
|
||||||
|
|
||||||
|
script:
|
||||||
|
- bin/test-yesod
|
||||||
|
|
||||||
|
retry: 2
|
||||||
|
interruptible: true
|
||||||
|
|
||||||
|
yesod:test:yesod:dev:
|
||||||
|
stage: test
|
||||||
|
cache: {}
|
||||||
|
|
||||||
|
services: *test-services
|
||||||
|
|
||||||
|
needs:
|
||||||
|
- job: npm install # transitive
|
||||||
|
artifacts: false
|
||||||
|
- job: frontend:build #transitive
|
||||||
|
artifacts: false
|
||||||
|
- job: yesod:build:dev
|
||||||
|
artifacts: true
|
||||||
|
|
||||||
|
rules:
|
||||||
|
- if: $CI_COMMIT_REF_NAME =~ /(^v[0-9].*)|((^|\/)profile($|\/))/
|
||||||
|
when: manual
|
||||||
|
allow_failure: true
|
||||||
|
- when: on_success
|
||||||
|
|
||||||
|
script:
|
||||||
|
- bin/test-yesod
|
||||||
|
|
||||||
|
retry: 2
|
||||||
|
interruptible: true
|
||||||
|
|
||||||
|
yesod:test:hlint:
|
||||||
|
stage: test
|
||||||
|
cache: {}
|
||||||
|
|
||||||
|
needs:
|
||||||
|
- job: npm install # transitive
|
||||||
|
artifacts: false
|
||||||
|
- job: frontend:build #transitive
|
||||||
|
artifacts: false
|
||||||
|
- job: yesod:build
|
||||||
|
artifacts: true
|
||||||
|
|
||||||
|
rules:
|
||||||
|
- if: $CI_COMMIT_REF_NAME =~ /^v[0-9].*/
|
||||||
|
when: on_success
|
||||||
|
|
||||||
|
script:
|
||||||
|
- bin/test-hlint
|
||||||
|
|
||||||
|
retry: 2
|
||||||
|
interruptible: true
|
||||||
|
|
||||||
|
yesod:test:hlint:dev:
|
||||||
|
stage: test
|
||||||
|
cache: {}
|
||||||
|
|
||||||
|
needs:
|
||||||
|
- job: npm install # transitive
|
||||||
|
artifacts: false
|
||||||
|
- job: frontend:build #transitive
|
||||||
|
artifacts: false
|
||||||
|
- job: yesod:build:dev
|
||||||
|
artifacts: true
|
||||||
|
|
||||||
|
rules:
|
||||||
|
- if: $CI_COMMIT_REF_NAME =~ /(^v[0-9].*)|((^|\/)profile($|\/))/
|
||||||
|
when: manual
|
||||||
|
allow_failure: true
|
||||||
|
- when: on_success
|
||||||
|
|
||||||
|
script:
|
||||||
|
- bin/test-hlint
|
||||||
|
|
||||||
|
retry: 2
|
||||||
|
interruptible: true
|
||||||
|
|
||||||
frontend:test:
|
frontend:test:
|
||||||
cache:
|
cache:
|
||||||
<<: *global_cache
|
<<: *global_cache
|
||||||
@ -226,7 +322,7 @@ parse-changelog:
|
|||||||
artifacts: true
|
artifacts: true
|
||||||
rules:
|
rules:
|
||||||
- if: $CI_COMMIT_REF_NAME =~ /^v[0-9].*/
|
- if: $CI_COMMIT_REF_NAME =~ /^v[0-9].*/
|
||||||
when: always
|
when: on_success
|
||||||
before_script:
|
before_script:
|
||||||
- rm -rvf /etc/apt/sources.list /etc/apt/sources.list.d
|
- rm -rvf /etc/apt/sources.list /etc/apt/sources.list.d
|
||||||
- install -v -T -m 0644 ${APT_SOURCES_LIST} /etc/apt/sources.list
|
- install -v -T -m 0644 ${APT_SOURCES_LIST} /etc/apt/sources.list
|
||||||
@ -266,9 +362,13 @@ upload:
|
|||||||
artifacts: false
|
artifacts: false
|
||||||
- job: frontend:test # validation
|
- job: frontend:test # validation
|
||||||
artifacts: false
|
artifacts: false
|
||||||
|
- job: yesod:test:hlint # validation
|
||||||
|
artifacts: false
|
||||||
|
- job: yesod:test:yesod # validation
|
||||||
|
artifacts: false
|
||||||
rules:
|
rules:
|
||||||
- if: $CI_COMMIT_REF_NAME =~ /^v[0-9].*/
|
- if: $CI_COMMIT_REF_NAME =~ /^v[0-9].*/
|
||||||
when: always
|
when: on_success
|
||||||
before_script:
|
before_script:
|
||||||
- export VERSION="$(cat .current-version)"
|
- export VERSION="$(cat .current-version)"
|
||||||
script:
|
script:
|
||||||
@ -302,9 +402,13 @@ release:
|
|||||||
artifacts: false
|
artifacts: false
|
||||||
- job: frontend:test # validation
|
- job: frontend:test # validation
|
||||||
artifacts: false
|
artifacts: false
|
||||||
|
- job: yesod:test:hlint # validation
|
||||||
|
artifacts: false
|
||||||
|
- job: yesod:test:yesod # validation
|
||||||
|
artifacts: false
|
||||||
rules:
|
rules:
|
||||||
- if: $CI_COMMIT_REF_NAME =~ /^v[0-9].*/
|
- if: $CI_COMMIT_REF_NAME =~ /^v[0-9].*/
|
||||||
when: always
|
when: on_success
|
||||||
before_script:
|
before_script:
|
||||||
- export VERSION="$(cat .current-version)"
|
- export VERSION="$(cat .current-version)"
|
||||||
script:
|
script:
|
||||||
|
|||||||
Reference in New Issue
Block a user