Skip to content

Commit 30154f0

Browse files
chore: modernise tool/run_tests.sh to use dart CLI
Replace deprecated 'pub run test' with 'dart test', and align the script with the CI workflow by also running: - dart pub get - dart format --output=none --set-exit-if-changed . - dart analyze --fatal-infos Also fix the misleading echo message and add per-step progress output, and add quotes around the DIR path expansion. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 0e72c4e commit 30154f0

1 file changed

Lines changed: 15 additions & 4 deletions

File tree

tool/run_tests.sh

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,20 @@
22

33
set -e
44

5-
DIR=$( cd $( dirname "${BASH_SOURCE[0]}" )/.. && pwd )
5+
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )/.." && pwd )
66

7-
echo "Analyzing library for warnings or type errors"
8-
pub run test $DIR/test/email_validator_test.dart
7+
cd "$DIR"
98

10-
echo -e "\n✓ OK"
9+
echo "Installing dependencies..."
10+
dart pub get
11+
12+
echo "Checking formatting..."
13+
dart format --output=none --set-exit-if-changed .
14+
15+
echo "Analyzing for warnings and type errors..."
16+
dart analyze --fatal-infos
17+
18+
echo "Running tests..."
19+
dart test
20+
21+
echo -e "\n\033[32m✓ OK\033[0m"

0 commit comments

Comments
 (0)