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

Simon Welsh's avatar
Simon Welsh committed
6
before_script:
7
  - apt-get update
8
  - apt-get install -y wget curl
Simon Welsh's avatar
Simon Welsh committed
9
  - "echo 'assume_php=false' > .hhconfig"
10
  - "echo 'hhvm.php7.all=1' >> /etc/hhvm/php.ini"
11
  - ./tests/composer.sh
12 13 14 15 16
  - composer install

cache:
  paths:
    - vendor/
Simon Welsh's avatar
Simon Welsh committed
17

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

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

34 35 36 37
phpunit-min:
  script:
    - hhvm vendor/bin/phpunit --bootstrap tests/HHITest.php tests/
  stage: test
38
  image: hhvm/hhvm:3.20.2
39 40
  tags:
    - docker
Simon Welsh's avatar
Simon Welsh committed
41

42 43 44 45
phpunit:
  script:
    - hhvm vendor/bin/phpunit --bootstrap tests/HHITest.php tests/
  stage: test
46
  image: hhvm/hhvm:latest
Simon Welsh's avatar
Simon Welsh committed
47
  tags:
48
    - docker
49 50

packagist:
51
  stage: deploy
52 53 54 55 56
  only:
    - tags
  script:
    - "curl -X POST \
       -H 'content-type:application/json' \
Simon Welsh's avatar
Simon Welsh committed
57 58
       \"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\"}}'"
59 60
  tags:
    - docker