forked from danger/danger-js
-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (50 loc) · 1.77 KB
/
CI.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
name: CI
on: pull_request
jobs:
test:
runs-on: ubuntu-20.04
steps:
# Check out, and set up the node/ruby infra
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
# Get local dependencies & test
- run: yarn install
- run: yarn build
- run: yarn test
# Validate related tooling
- run: yarn declarations
- run: yarn tsc distribution/danger.d.ts
- run: rm -rf node_modules/@types/babel-*
- run: rm -rf node_modules/@types/babylon
# Not many Flow users nowadays, so this probably is worth dropping
# if it becomes an issue.
- run: echo "Testing Flow definition file"
- run: yarn build:flow-types
# - run: yarn flow check
- run: 'echo "This is only for Integration tests on two blank projects"'
- run: |
mkdir danger_blank_test
cd danger_blank_test
yarn init --yes
yarn add file:..
echo "warn('I warned you')" > dangerfile.js
echo "Testing a blank Dangerfile on an empty project"
DEBUG="*" yarn danger run --text-only
cd ..
rm -rf danger_blank_test
name: "Make a CRA"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: |
npm install -g create-react-app
create-react-app danger_babel_test
cd danger_babel_test
yarn add file:..
echo "warn('Expect 2 warnings'); const a = async () => {warn('the other');}; schedule(a)" > dangerfile.js
echo "Testing a blank Dangerfile on a babel CRA project"
DEBUG="*" yarn danger ci --text-only
cd ..
rm -rf danger_babel_test
name: "Make a small babel app"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}