forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (34 loc) · 1.15 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
name: CI
on: pull_request
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "16"
# 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: |
# Exposing this token is safe because the user of it has no other public repositories
# and has no permission to modify this repository. See #62638 for the discussion.
TOKEN='ghp_i5wtj1l2AbpFv3OU96w6R'
TOKEN+='On3bHOkcV2AmVY6'
DANGER_GITHUB_API_TOKEN=$TOKEN yarn danger ci || $( exit 0 )