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

Simon Welsh's avatar
Simon Welsh committed
6 7
before_script:
  - "echo 'assume_php=false' > .hhconfig"
8 9 10 11 12
  - composer install

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

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

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

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

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

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