forked from microsoft/TypeScript-Website
-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (48 loc) · 1.73 KB
/
Copy pathCI.yml
File metadata and controls
57 lines (48 loc) · 1.73 KB
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
name: CI
on: pull_request
jobs:
test:
runs-on: ubuntu-latest
steps:
# Check out, and set up the node/ruby infra
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: '13.x'
# Get local dependencies
- run: yarn install
- run: yarn bootstrap
- run: yarn build
# PR: Deploy if we can
- name: Deploy PR Version
if: github.event_name == 'pull_request'
run: 'if test -z "$NOW_ACCESS_TOKEN"; then echo "Skipping deploy";
else cp -r packages/typescriptlang-org/public packages/typescriptlang-org/typescript-v2-$PR_NUMBER ; npx now packages/typescriptlang-org/typescript-v2-$PR_NUMBER --token="$NOW_ACCESS_TOKEN" --confirm; fi'
env:
NOW_ACCESS_TOKEN: ${{ secrets.NOW_ACCESS_TOKEN }}
PR_NUMBER: ${{ github.event.pull_request.number }}
# Run any tests
- run: yarn workspaces run test --ci
env:
CI: true
lighthouse_danger:
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@master
- uses: actions/setup-node@v1
with:
node-version: '13.x'
- run: yarn install
- run: yarn workspace typescriptlang-org run create-lighthouse-json
env:
PR_NUMBER: ${{ github.event.pull_request.number }}
- name: Run Lighthouse and test budgets
uses: orta/lighthouse-ci-action@ort-fork-pr-29
env:
PR_NUMBER: ${{ github.event.pull_request.number }}
# danger for PR builds
- if: github.event_name == 'pull_request'
run: 'if test -z "$GITHUB_TOKEN"; then echo "Skipping danger"; else yarn danger ci; fi'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}