forked from danger/danger-js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
75 lines (64 loc) · 2.58 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
language: node_js
cache:
yarn: true
directories:
- node_modules
- .jest/cache
matrix:
include:
# Normal CI test runs :D
- node_js: "10"
- node_js: "10"
after_script:
- echo "Validating TypeScript definition file"
- yarn build
- yarn declarations
- yarn tsc distribution/danger.d.ts
- rm -rf node_modules/@types/babel-*
- rm -rf node_modules/@types/babylon
- echo "Testing Flow definition file"
- yarn build:flow-types
- yarn flow check
# Checks every example dangerfile can run in `danger runner`.
- node_js: "10"
script:
- yarn build
- node scripts/run-fixtures.js
# Runs both the CI and PR with a custom process to ensure apps like swift/rust work
- node_js: "10.13"
script:
- yarn build
- node distribution/commands/danger-ci.js --process "ruby scripts/danger_runner.rb"
- node distribution/commands/danger-pr.js --process "ruby scripts/danger_runner.rb"
https://github.com/danger/danger-js/pull/760
# Does the real danger run
- node_js: "node"
script:
- yarn jest --outputFile test-results.json --json --runInBand
- yarn run link
# If the PR is odd then run using issue commenting, else use checks
# - |
# if [ $(($TRAVIS_PULL_REQUEST % 2)) -eq 0 ];
# then
# echo "This is the real `danger ci` run on this repo, using issues";
# DEBUG="*" danger ci --verbose;
# else
# echo "This is the real `danger ci` run on this repo, using github checks with a custom app";
# DEBUG="*" DANGER_GITHUB_APP_ID=12482 danger ci --verbose;
#
# echo "This is the real `danger ci` run on this repo, using github checks with the danger app";
# DEBUG="*" DANGER_JS_APP_INSTALL_ID=177994 danger ci --verbose;
# fi
- DEBUG="*" DANGER_GITHUB_APP_ID=12482 danger ci --verbose;
- echo "Validating that danger pr works as expected"
- DEBUG="*" danger pr https://github.com/danger/danger-js/pull/465 --dangerfile dangerfile.circle.js --verbose
- echo "Grabbing main so that danger-local can use it for comparison"
- git checkout -t origin/main || true
- '[ ! -z $TRAVIS_PULL_REQUEST ] && DEBUG="*" danger local --dangerfile
source/platforms/git/_tests/local_dangerfile_example.ts || echo "Skipping Danger Local for non PR run"'
script:
- yarn lint
- yarn add jest
- yarn jest --runInBand
notifications:
slack: dangergem:9FOZou9EGBV9xO1Ol4bxRPz9