.gitlab-ci.yml 1.65 KB
Newer Older
1 2 3 4 5
stages:
  - typecheck
  - test
  - deploy

Simon Welsh's avatar
Simon Welsh committed
6
before_script:
7
  - echo 'hhvm.php7.all=1' >> /etc/hhvm/php.ini
8 9 10 11
  - echo 'assume_php=false' > .hhconfig
  - echo 'safe_array=true' >> .hhconfig
  - echo 'safe_vector_array=true' >> .hhconfig
  - echo 'enable_experimental_tc_features = safe_pass_by_ref, no_fallback_in_namespaces' >> .hhconfig
12
  - ./tests/composer.sh
13 14
  - composer install

15
cache: &cache
Simon Welsh's avatar
Simon Welsh committed
16 17 18 19
  key: "$CI_COMMIT_REF_SLUG"
  paths:
    - vendor/

20 21 22 23
hack-min:
  script:
    - hh_server --check .
  stage: typecheck
Simon Welsh's avatar
Simon Welsh committed
24
  image: hhvm/hhvm:3.24.3
25 26
  tags:
    - docker
Simon Welsh's avatar
Simon Welsh committed
27

Simon Welsh's avatar
Simon Welsh committed
28 29
hack:
  script:
Simon Welsh's avatar
Simon Welsh committed
30
    - hh_server --check .
31
  stage: typecheck
32
  image: hhvm/hhvm:latest
33
  tags:
34
    - docker
35

36 37 38 39 40 41 42 43
hack-nightly:
  script:
    - hh_server --check .
  stage: typecheck
  image: hhvm/hhvm:nightly
  tags:
    - docker

44 45
phpunit-min:
  script:
Simon Welsh's avatar
Simon Welsh committed
46
    - hhvm vendor/bin/phpunit tests/
47
  stage: test
Simon Welsh's avatar
Simon Welsh committed
48
  image: hhvm/hhvm:3.24.3
49 50
  tags:
    - docker
Simon Welsh's avatar
Simon Welsh committed
51
  cache:
Simon Welsh's avatar
Simon Welsh committed
52
    <<: *cache
Simon Welsh's avatar
Simon Welsh committed
53
    policy: pull
Simon Welsh's avatar
Simon Welsh committed
54

55 56
phpunit:
  script:
Simon Welsh's avatar
Simon Welsh committed
57
    - hhvm vendor/bin/phpunit tests/
58
  stage: test
59
  image: hhvm/hhvm:latest
Simon Welsh's avatar
Simon Welsh committed
60
  tags:
61
    - docker
Simon Welsh's avatar
Simon Welsh committed
62
  cache:
Simon Welsh's avatar
Simon Welsh committed
63
    <<: *cache
Simon Welsh's avatar
Simon Welsh committed
64
    policy: pull
65

66 67
phpunit-nightly:
  script:
Simon Welsh's avatar
Simon Welsh committed
68
    - hhvm vendor/bin/phpunit tests/
69 70 71 72
  stage: test
  image: hhvm/hhvm:nightly
  tags:
    - docker
Simon Welsh's avatar
Simon Welsh committed
73
  cache:
Simon Welsh's avatar
Simon Welsh committed
74
    <<: *cache
Simon Welsh's avatar
Simon Welsh committed
75
    policy: pull
76

77
packagist:
78
  stage: deploy
79 80
  only:
    - tags
Simon Welsh's avatar
Simon Welsh committed
81
  before_script:
Simon Welsh's avatar
Simon Welsh committed
82
    - 'true'
83 84 85
  script:
    - "curl -X POST \
       -H 'content-type:application/json' \
Simon Welsh's avatar
Simon Welsh committed
86 87
       \"https://packagist.org/api/update-package?username=simon_w&apiToken=$PACKAGIST_TOKEN\" \
       -d '{\"repository\":{\"url\":\"https://git.simon.geek.nz/91-carriage/phpunit-hhi.git\"}}'"
88 89
  tags:
    - docker
Simon Welsh's avatar
Simon Welsh committed
90
  cache:
Simon Welsh's avatar
Simon Welsh committed
91
    <<: *cache
Simon Welsh's avatar
Simon Welsh committed
92
    policy: pull