Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • alexander.vorwerk/studip
  • hochschule-wismar/stud-ip
  • tleilax/studip
  • marcus/studip
  • manschwa/studip
  • eberhardt/studip
  • uol/studip
  • pluta/studip
  • thienel/extern-uni-b
  • studip/studip
  • strohm/studip
  • uni-osnabrueck/studip
  • FloB/studip
  • universit-t-rostock/studip
  • Robinyyy/studip
  • jakob.diel/studip
  • HyperSpeeed/studip
  • ann/studip
  • nod3zer0/stud-ip-siple-saml-php-plugin
19 results
Show changes
Commits on Source (3)
......@@ -33,18 +33,18 @@ stages:
- release
.scripts:
mkdir-caches: &mkdir-caches
mkdir-caches:
- mkdir -p $CACHE_DIR
mkdir-reports: &mkdir-reports
mkdir-reports:
- mkdir -p $REPORT_DIR
install-composer: &install-composer
install-composer:
- make composer-dev
configure-studip: &configure-studip
- *install-composer
configure-studip:
- !reference [.scripts, install-composer]
- cp docker/studip/config_local.php config/config_local.inc.php
- cp config/config.inc.php.dist config/config.inc.php
initialize-studip-database: &initialize-studip-database
- *configure-studip
initialize-studip-database:
- !reference [.scripts, configure-studip]
- chmod +x .gitlab/scripts/install_db.sh
- .gitlab/scripts/install_db.sh
- cli/studip migrate
......@@ -57,7 +57,7 @@ stages:
paths:
- composer/
policy: pull
npm: &npm-cache
npm:
key:
files:
- package-lock.json
......@@ -65,13 +65,35 @@ stages:
- .npm
.definitions:
mariadb-service: &mariadb-service
mariadb-service:
- name: mariadb
command: [ "--sql_mode=","--character-set-client=utf8","--character-set-server=utf8","--collation-server=utf8_unicode_ci"]
php-changed:
- changes:
paths:
- "**/*.php"
- composer.lock
compare_to: 'refs/heads/main'
css-changed:
- changes:
paths:
- "resources/assets/stylesheets/**/*"
- package-lock.json
compare_to: 'refs/heads/main'
js-changed:
- changes:
paths:
- "resources/assets/javascripts/**/*"
- "resources/vue/**/*"
- package-lock.json
compare_to: 'refs/heads/main'
build-composer:
stage: build
needs: []
rules:
- !reference [.definitions, php-changed]
- when: manual
interruptible: true
variables:
COMPOSER_CACHE: $CACHE_DIR/composer-cache
......@@ -80,7 +102,7 @@ build-composer:
script:
- composer install
cache:
- *composer-cache
- !reference [.caches, composer]
- key: composer-package-cache
paths:
- $COMPOSER_CACHE
......@@ -89,20 +111,22 @@ build-composer:
lint-php:
stage: checks
needs: [build-composer]
rules:
- !reference [.definitions, php-changed]
variables:
CACHE_LOCATION: $CACHE_DIR/phplint-cache
PHPLINT_JSON_REPORT: $REPORT_DIR/phplint-report.json
PHPLINT_CODE_QUALITY_REPORT: $REPORT_DIR/phplint-codequality.json
interruptible: true
cache:
- *composer-cache
- !reference [.caches, composer]
- key: "$CI_JOB_NAME_SLUG:$CI_COMMIT_REF_SLUG"
paths:
- $CACHE_LOCATION
before_script:
- *mkdir-caches
- *mkdir-reports
- *install-composer
- !reference [.scripts, mkdir-caches]
- !reference [.scripts, mkdir-reports]
- !reference [.scripts, install-composer]
script:
- COMPOSER_MEMORY_LIMIT=-1
composer exec phplint
......@@ -119,20 +143,22 @@ lint-php-7.4:
image: studip/studip:tests-php8.2
stage: checks
needs: [build-composer]
rules:
- !reference [.definitions, php-changed]
variables:
CACHE_LOCATION: $CACHE_DIR/phplint-cache
PHPLINT_JSON_REPORT: $REPORT_DIR/phplint-report-7.4.json
PHPLINT_CODE_QUALITY_REPORT: $REPORT_DIR/phplint-codequality-7.4.json
interruptible: true
cache:
- *composer-cache
- !reference [.caches, composer]
- key: "$CI_JOB_NAME_SLUG:$CI_COMMIT_REF_SLUG"
paths:
- $CACHE_LOCATION
before_script:
- *mkdir-caches
- *mkdir-reports
- *install-composer
- !reference [.scripts, mkdir-caches]
- !reference [.scripts, mkdir-reports]
- !reference [.scripts, install-composer]
script:
- COMPOSER_MEMORY_LIMIT=-1
composer exec phplint
......@@ -148,6 +174,8 @@ lint-php-7.4:
lint-js:
stage: checks
needs: []
rules:
- !reference [.definitions, js-changed]
image: $NODE_IMAGE
variables:
CACHE_LOCATION: $CACHE_DIR/eslint-cache
......@@ -158,7 +186,7 @@ lint-js:
- $CACHE_LOCATION
interruptible: true
before_script:
- *mkdir-reports
- !reference [.scripts, mkdir-reports]
- npm install -g npm@7
- npm install
--no-save --no-audit --no-fund
......@@ -177,6 +205,8 @@ lint-js:
lint-css:
stage: checks
needs: []
rules:
- !reference [.definitions, css-changed]
image: $NODE_IMAGE
variables:
CACHE_LOCATION: $CACHE_DIR/stylelint-cache
......@@ -187,7 +217,7 @@ lint-css:
paths:
- $CACHE_LOCATION
before_script:
- *mkdir-reports
- !reference [.scripts, mkdir-reports]
- npm install
--no-save --no-audit --no-fund
--loglevel=error
......@@ -215,14 +245,14 @@ phpstan:
interruptible: true
when: manual
cache:
- *composer-cache
- !reference [.caches, composer]
- key: "$CO_JOB_NAME_SLUG:$CI_COMMIT_REF_SLUG"
paths:
- $CACHE_LOCATION
before_script:
- *mkdir-caches
- *mkdir-reports
- *install-composer
- !reference [.scripts, mkdir-caches]
- !reference [.scripts, mkdir-reports]
- !reference [.scripts, install-composer]
- 'echo "includes:\n - phpstan.neon.dist\n\nparameters:\n tmpDir: $PHPSTAN_CACHE_PATH" > phpstan.neon'
script:
- php
......@@ -240,6 +270,8 @@ phpstan:
test-unit:
stage: test
needs: [lint-php]
rules:
- !reference [.definitions, php-changed]
variables:
PHPUNIT_XML_REPORT: $REPORT_DIR/phpunit-report.xml
cache:
......@@ -248,8 +280,8 @@ test-unit:
allow_failure: false
interruptible: true
before_script:
- *mkdir-reports
- *configure-studip
- !reference [.scripts, mkdir-reports]
- !reference [.scripts, configure-studip]
script:
- 'composer/bin/codecept
run unit
......@@ -264,13 +296,16 @@ test-unit:
test-jest:
stage: test
needs: [lint-js]
rules:
- !reference [.definitions, js-changed]
image: $NODE_IMAGE
variables:
JS_TEST_REPORT: $REPORT_DIR/jest.xml
cache: *npm-cache
cache:
- !reference [.caches, npm]
interruptible: true
before_script:
- *mkdir-reports
- !reference [.scripts, mkdir-reports]
- npm install
script:
- JEST_JUNIT_OUTPUT_FILE="$JS_TEST_REPORT" npx jest tests/jest/ --ci --reporters=default --reporters=jest-junit
......@@ -281,6 +316,8 @@ test-jest:
test-functional:
stage: test
needs: [lint-php]
rules:
- !reference [.definitions, php-changed]
variables:
FUNCTIONAL_XML_REPORT: $REPORT_DIR/functional-report.xml
FUNCTIONAL_CODE_QUALITY_REPORT: $REPORT_DIR/functional-codequality.json
......@@ -288,12 +325,12 @@ test-functional:
<<: *composer-cache
policy: pull
services:
- *mariadb-service
- !reference [.definitions, mariadb-service]
allow_failure: false
interruptible: true
before_script:
- *mkdir-reports
- *initialize-studip-database
- !reference [.scripts, mkdir-reports]
- !reference [.scripts, initialize-studip-database]
script:
- 'composer/bin/codecept
run functional
......@@ -308,17 +345,19 @@ test-functional:
test-jsonapi:
stage: test
needs: [lint-php]
rules:
- !reference [.definitions, php-changed]
cache:
<<: *composer-cache
policy: pull
services:
- *mariadb-service
- !reference [.definitions, mariadb-service]
variables:
JSONAPI_XML_REPORT: $REPORT_DIR/jsonapi-report.xml
interruptible: true
before_script:
- *mkdir-reports
- *initialize-studip-database
- !reference [.scripts, mkdir-reports]
- !reference [.scripts, initialize-studip-database]
script:
- 'composer/bin/codecept
run jsonapi
......@@ -333,8 +372,13 @@ test-jsonapi:
test-assets:
stage: test
needs: []
rules:
- !reference [.definitions, js-changed]
- !reference [.definitions, css-changed]
- when: manual
image: $NODE_IMAGE
cache: *npm-cache
cache:
- !reference [.caches, npm]
interruptible: true
before_script:
- npm install
......@@ -354,8 +398,8 @@ test-e2e:
interruptible: true
when: manual
cache:
- *composer-cache
- *npm-cache
- !reference [.caches, composer]
- !reference [.caches, npm]
before_script:
- mkdir ./bin
- apt-get update
......@@ -374,8 +418,8 @@ test-e2e:
- php composer-setup.php --install-dir=./bin --filename=composer
- export PATH="./bin:$PATH"
- php -r "unlink('composer-setup.php');"
- *mkdir-reports
- *initialize-studip-database
- !reference [.scripts, mkdir-reports]
- !reference [.scripts, initialize-studip-database]
- ./cli/studip config:set SHOW_TERMS_ON_FIRST_LOGIN 0
- npm install playwright
- npm ci
......