-
-
Notifications
You must be signed in to change notification settings - Fork 368
64 lines (55 loc) · 1.95 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
59
60
61
62
63
64
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@v4
- uses: actions/setup-node@v4
with:
node-version: "18"
# Get local dependencies & test
- run: yarn install
- run: yarn build
- run: yarn test
# Validate related tooling
- run: yarn declarations
- run: yarn tsc --esModuleInterop 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: echo "Running built Danger"
- run: node distribution/commands/danger-ci.js
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- 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 }}