forked from microsoft/TypeScript-Website
-
Notifications
You must be signed in to change notification settings - Fork 0
83 lines (67 loc) · 2.16 KB
/
CI.yml
File metadata and controls
83 lines (67 loc) · 2.16 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
name: CI
on: pull_request
jobs:
tests:
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"
- uses: actions/cache@v2
id: yarn-cache
with:
path: |
packages/typescriptlang-org/.cache
packages/.cache
**/node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- uses: microsoft/playwright-github-action@v1
# Install, should be absically instant if cached
- run: yarn install
env:
YARN_CHECKSUM_BEHAVIOR: ignore
# Verify dependencies are hooked up right
- run: node test/verifyPackageVersions.js
# Grab localizations
- run: yarn docs-sync pull microsoft/TypeScript-Website-localizations#main 1
# Build the packages
- run: yarn bootstrap
- run: yarn workspace typescriptlang-org build
# Verify it compiles
- run: yarn compile
# Run all the package's tests
- run: yarn test
env:
CI: true
# danger for PR builds
- if: github.event_name == 'pull_request' && github.event.base.repo.id == github.event.head.repo.id
run: "yarn danger ci"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_DEPLOY_URL_ROOT: ${{ steps.deploy.outputs.static_web_app_url }}
- name: "Validates that TypeScript plugins work"
run: |
cd ..
npm init typescript-playground-plugin playground-my-plugin
windows:
runs-on: windows-latest
steps:
# Check out, and set up the node infra
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: "13.x"
# Get local dependencies
- run: yarn install
env:
YARN_CHECKSUM_BEHAVIOR: ignore
- run: yarn bootstrap
- run: yarn build
- name: "Validates that TypeScript plugins work"
run: |
cd ..
npm init typescript-playground-plugin playground-my-plugin