mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2025-12-12 17:26:22 +00:00
82 lines
1.9 KiB
YAML
82 lines
1.9 KiB
YAML
# `rules: if $CI_PIPELINE_SOURCE == 'merge_request_event'` seems to convert the whole
|
|
# workflow into a merge request pipeline, effectively removing all the jobs.
|
|
# To work around that, add:
|
|
# ```
|
|
# rules:
|
|
# when: on_success
|
|
# ```
|
|
# To your pipeline.
|
|
# https://docs.gitlab.com/ee/ci/pipelines/merge_request_pipelines.html#use-rules-to-add-jobs
|
|
include:
|
|
- local: /backend/backend/.gitlab-ci.yml
|
|
- local: /frontend/app/.gitlab-ci.yml
|
|
- local: /.gitlab/publishing.gitlab-ci.yml
|
|
rules:
|
|
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
|
when: never
|
|
|
|
default:
|
|
image: registry.gitlab.com/openstapps/projectmanagement/builder:v18
|
|
tags:
|
|
- performance
|
|
interruptible: true
|
|
before_script:
|
|
- echo TURBO_API=$TURBO_API >> .env.local
|
|
- echo TURBO_TOKEN=$TURBO_TOKEN >> .env.local
|
|
- echo TURBO_TEAM=$TURBO_TEAM >> .env.local
|
|
- pnpm config set store-dir .pnpm-store
|
|
cache: &pnpm_cache
|
|
key:
|
|
files:
|
|
- pnpm-lock.yaml
|
|
paths:
|
|
- .pnpm-store/
|
|
policy: pull
|
|
|
|
stages:
|
|
- version
|
|
- build
|
|
- test
|
|
- review
|
|
- publish
|
|
|
|
build:
|
|
stage: build
|
|
script:
|
|
- pnpm config set recursive-install false
|
|
- pnpm i --prefer-offline
|
|
- pnpm build:full:skip || pnpm i -r --prefer-offline
|
|
- pnpm build:full
|
|
- mv frontend/app/www www
|
|
artifacts:
|
|
paths:
|
|
- www
|
|
cache:
|
|
<<: *pnpm_cache
|
|
policy: pull-push
|
|
rules:
|
|
- when: on_success
|
|
|
|
unit:
|
|
stage: test
|
|
needs: ['build']
|
|
script:
|
|
- pnpm config set recursive-install false
|
|
- pnpm i --prefer-offline
|
|
- pnpm test:skip || pnpm i -r --prefer-offline
|
|
- pnpm test
|
|
coverage: '/Statements[^:]*\:[^:]*\s+([\d\.]+)%/'
|
|
artifacts:
|
|
when: always
|
|
paths:
|
|
- report-junit.xml
|
|
- coverage.xml
|
|
reports:
|
|
junit:
|
|
- report-junit.xml
|
|
coverage_report:
|
|
coverage_format: cobertura
|
|
path: coverage.xml
|
|
rules:
|
|
- when: on_success
|