Skip to content

Commit 48dcb4b

Browse files
committed
suite-ci.sh -> suite.sh
1 parent 7f3fff7 commit 48dcb4b

File tree

4 files changed

+44
-47
lines changed

4 files changed

+44
-47
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ jobs:
362362
run: make -C tests/gentype_tests/typescript-react-example clean test
363363

364364
- name: Run rewatch tests
365-
run: ./rewatch/tests/suite-ci.sh
365+
run: ./rewatch/tests/suite.sh
366366
shell: bash
367367

368368
- name: Run syntax benchmarks
@@ -659,7 +659,7 @@ jobs:
659659
working-directory: rewatch/testrepo
660660

661661
- name: Run rewatch integration tests
662-
run: ./rewatch/tests/suite-ci.sh node_modules/.bin/rescript
662+
run: ./rewatch/tests/suite.sh node_modules/.bin/rescript
663663
shell: bash
664664

665665
publish:

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ test-gentype:
4444
make -C tests/gentype_tests/typescript-react-example clean test
4545

4646
test-rewatch:
47-
./rewatch/tests/suite-ci.sh
47+
./rewatch/tests/suite.sh
4848

4949
test-all: test test-gentype test-analysis test-tools test-rewatch
5050

rewatch/tests/suite-ci.sh

Lines changed: 0 additions & 43 deletions
This file was deleted.

rewatch/tests/suite.sh

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,43 @@
11
#!/usr/bin/env bash
2+
3+
unset CLICOLOR_FORCE
4+
5+
# Make sure we are in the right directory
26
cd $(dirname $0)
3-
./suite-ci.sh
7+
8+
# Get rewatch executable location from the first argument or use default
9+
if [ -n "$1" ]; then
10+
REWATCH_EXECUTABLE="$1"
11+
else
12+
REWATCH_EXECUTABLE="../target/release/rewatch"
13+
eval $(node ./get_bin_paths.js)
14+
fi
15+
16+
export REWATCH_EXECUTABLE
17+
export RESCRIPT_BSC_EXE
18+
19+
source ./utils.sh
20+
21+
bold "Rescript version"
22+
(cd ../testrepo && ./node_modules/.bin/rescript -v)
23+
24+
# we need to reset the yarn.lock and package.json to the original state
25+
# so there is not diff in git. The CI will install new ReScript package
26+
bold "Reset package.json and yarn.lock"
27+
git checkout ../testrepo/yarn.lock &> /dev/null
28+
git checkout ../testrepo/package.json &> /dev/null
29+
success "Reset package.json and yarn.lock"
30+
31+
bold "Make sure the testrepo is clean"
32+
if git diff --exit-code ../testrepo &> diff.txt;
33+
then
34+
rm diff.txt
35+
success "Testrepo has no changes"
36+
else
37+
error "Testrepo is not clean to start with"
38+
cat diff.txt
39+
rm diff.txt
40+
exit 1
41+
fi
42+
43+
./compile.sh && ./watch.sh && ./lock.sh && ./suffix.sh && ./legacy.sh && ./format.sh

0 commit comments

Comments
 (0)