forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (32 loc) · 988 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
38
39
40
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: "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_i5wtj1l2AbpFv3OU96w6R'
TOKEN+='On3bHOkcV2AmVY6'
DANGER_GITHUB_API_TOKEN=$TOKEN yarn danger ci || $( exit 0 )