.gitlab-ci.yml 1.06 KB
Newer Older
Thomas Löffler's avatar
Thomas Löffler committed
1
2
include:
  - template: Dependency-Scanning.gitlab-ci.yml
3
  - remote: 'https://git.spooner.io/ci-templates/composer-packages/-/raw/main/composer-packages.yml'
Thomas Löffler's avatar
Thomas Löffler committed
4

5
6
7
cache:
  key: "$CI_COMMIT_REF_NAME-$CI_JOB_STAGE"
  paths:
Thomas Löffler's avatar
Thomas Löffler committed
8
    - Build/cache/
Thomas Löffler's avatar
Thomas Löffler committed
9
    - Build/node_modules/
10

11
stages:
12
  - packages
13
  - test
14
  - build
15

Thomas Löffler's avatar
Thomas Löffler committed
16
17
test:typoscript:
    stage: test
18
    image: composer:2.0.7
Thomas Löffler's avatar
Thomas Löffler committed
19
    before_script:
Thomas Löffler's avatar
Thomas Löffler committed
20
      - composer global require helmich/typo3-typoscript-lint
Thomas Löffler's avatar
Thomas Löffler committed
21
    script:
22
      - /tmp/vendor/bin/typoscript-lint -c typoscript-lint.yml --fail-on-warnings
Thomas Löffler's avatar
Thomas Löffler committed
23

24
25
26
27
28
29
test:php:
    stage: test
    image: ekreative/php-cs-fixer:2
    variables:
        GIT_STRATEGY: "clone"
    script:
30
        - php-cs-fixer fix --config=Build/.php_cs --format=gitlab > report.json
Thomas Löffler's avatar
Thomas Löffler committed
31
        - cat report.json
32
33
34
35
    artifacts:
      reports:
        codequality:
          - report.json
36

37
build:
38
  image: node:12
39
40
  stage: build
  before_script:
41
    - npm config set cache cache/npm/ --global
Thomas Löffler's avatar
Thomas Löffler committed
42
    - cd Build
43
  script:
44
    - npm install > /dev/null
45
    - npm run ci
Thomas Löffler's avatar
Thomas Löffler committed
46
  dependencies: []
47
48
  artifacts:
    paths:
Markus Sommer's avatar
Markus Sommer committed
49
      - Resources/Public/