forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (30 loc) · 957 Bytes
/
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
name: CI
on: pull_request
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: "12"
# forbid symlinks
- name: "Pre-run validation"
run: |
symlinks="$(find . -type l)"
if [[ -n "$symlinks" ]]; then
printf "Aborting: symlinks found:\n%s" "$symlinks"; exit 1
fi
# Get local dependencies
- run: npm install
# Run tests
- run: npm run test-all
- name: "Run Danger"
env:
# See https://github.com/danger/danger-js/issues/1042
DANGER_GITHUB_API_BASE_URL: "https://api.github.com"
# Danger failing (for example through rate-limiting) shouldn't fail the build
run: |
TOKEN='ghp_LIdSl0O3uUFAhvHi'
TOKEN+='sU8G11alnuvPkv1uG70P'
DANGER_GITHUB_API_TOKEN=$TOKEN yarn danger ci || $( exit 0 )