-
Notifications
You must be signed in to change notification settings - Fork 143
84 lines (82 loc) · 2.59 KB
/
build.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
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
84
name: "All tests"
on:
push:
branches:
- main
pull_request:
jobs:
lint-and-test:
name: "Lint and core tests"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '16'
- run: yarn
- run: yarn build
- run: yarn lint
- run: yarn test-with-coverage && yarn report-coverage
- run: yarn test262
test-older-node:
name: "Test on older node versions"
runs-on: ubuntu-latest
strategy:
matrix:
include:
# We support down to node 8, but mocha requires node 14.
- node_version: '14'
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node_version }}
- run: yarn
# Do a fast build to avoid trying to run yarn on subprojects. Some
# website dependencies don't support old node versions, so yarn would
# fail for those.
- run: yarn fast-build
- run: yarn test-only
test-examples:
name: "Test example projects"
runs-on: ubuntu-latest
strategy:
matrix:
include:
- projects: "babel"
- projects: "react decaffeinate decaffeinate-parser coffee-lex"
- projects: "tslint apollo-client"
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '16'
- run: yarn
- run: yarn fast-build
- run: yarn run-examples ${{ matrix.projects }}
perf-benchmark:
name: "Compare performance"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
# Fetch all branches so we can compare with the default branch.
fetch-depth: 0
- uses: actions/setup-node@v2
with:
node-version: '16'
- run: yarn
# Clone the jest repo and run an untimed benchmark first, since the first
# run immediately after cloning tends to be slower.
- run: yarn benchmark jest-dev
- run: yarn benchmark-compare
# The benchmark-compare script leaves a ./.perf-comparison/summary.txt file
# to be forwarded to the comment-perf.yml workflow via an artifact. We
# also need to send the PR number. See that file and
# https://securitylab.github.com/research/github-actions-preventing-pwn-requests
# for details of how the two fit together.
- run: echo ${{ github.event.number }} > ./.perf-comparison/pr-number.txt
- uses: actions/upload-artifact@v2
with:
name: perf-comparison
path: .perf-comparison/