.gitlab-ci.yml 1.06 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
  - ./tests/composer.sh
11 12 13 14 15
  - composer install

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

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

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

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

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

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