/
e2e-prettier.sh
executable file
路45 lines (33 loc) 路 1.45 KB
/
e2e-prettier.sh
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
#!/bin/bash
#==============================================================================#
# SETUP #
#==============================================================================#
# Start in scripts/integration-tests/ even if run from root directory
cd "$(dirname "$0")" || exit
root="$PWD"
source utils/local-registry.sh
source utils/cleanup.sh
# Echo every command being executed
set -x
# Clone prettier
git clone --depth=1 https://github.com/prettier/prettier tmp/prettier
cd tmp/prettier || exit
# Update @babel/* dependencies
bump_deps="$root/utils/bump-babel-dependencies.js"
node "$bump_deps"
#==============================================================================#
# ENVIRONMENT #
#==============================================================================#
node -v
yarn --version
#==============================================================================#
# TEST #
#==============================================================================#
# Don't use Yarn 2
export YARN_IGNORE_PATH=1
startLocalRegistry "$root"/verdaccio-config.yml
yarn install
# Only run js,jsx,misc format tests
# Without --runInBand CircleCI hangs.
yarn test "tests/format/(jsx?|misc|typescript|flow|flow-repo)/" --update-snapshot --maxWorkers=2
cleanup