forked from TomasVotruba/tomasvotruba.com
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
48 lines (38 loc) · 1.22 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
language: php
php: '7.3'
install:
- composer install
script:
# run tests for tested posts (with "tested: true" in header configuration)
- vendor/bin/phpunit
# by pass finals hook test
- vendor/bin/phpunit --config tests/Posts/Year2019/FinalMock/Hook/phpunit-with-hook.xml tests/Posts/Year2019/FinalMock/Hook
- vendor/bin/phpunit --config tests/Posts/Year2019/FinalMock/Listener/phpunit-with-listener.xml tests/Posts/Year2019/FinalMock/Listener
# static analysis
- composer check-cs
- composer phpstan
# test that website is generated
- vendor/bin/statie generate source
# dump contributors before deploy
# - |
# if [[ $TRAVIS_BRANCH == "master" && $TRAVIS_PULL_REQUEST == "false" ]]; then
# vendor/bin/statie dump-contributors
# fi
# see docs: https://www.statie.org/docs/github-pages/
deploy:
provider: pages
skip_cleanup: true
github_token: $GITHUB_TOKEN
on:
branch: master
local_dir: output
after_deploy:
# tweets posts
- |
if [[ $TRAVIS_BRANCH == "master" && $TRAVIS_PULL_REQUEST == "false" ]]; then
vendor/bin/statie tweet-post
fi
notifications:
email:
on_success: never
on_failure: always