Skip to content

Commit 6180745

Browse files
committed
chore(ci): update test.sh and workflow
1 parent 438284b commit 6180745

2 files changed

Lines changed: 20 additions & 1 deletion

File tree

.github/workflows/minigo.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
run: |
3131
export ANTLR_JAR="$(pwd)/MiniGo/src/antlr-4.9.2-complete.jar"
3232
cd "MiniGo/src"
33-
./test.sh all
33+
./test.sh all_with_coverage
3434
coverage xml
3535
3636
- name: Upload coverage to Codecov

MiniGo/src/test.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,25 @@ case "$1" in
7474
echo "<<< RUNNING ALL TESTS >>>"
7575
echo ""
7676
echo "Running lexical analysis tests..."
77+
python main.py test LexerSuite
78+
echo ""
79+
echo "Running syntax analysis tests..."
80+
python main.py test ParserSuite
81+
echo ""
82+
echo "Running AST generation tests..."
83+
python main.py test ASTGenSuite
84+
echo ""
85+
echo "Running semantic analysis tests..."
86+
python main.py test CheckSuite
87+
echo ""
88+
;;
89+
all_with_coverage)
90+
# Execute all unit tests with coverage
91+
rm -f ${INPUT}/* 2>/dev/null
92+
rm -f ${OUTPUT}/* 2>/dev/null
93+
echo "<<< RUNNING ALL TESTS >>>"
94+
echo ""
95+
echo "Running lexical analysis tests..."
7796
coverage run --append main.py test LexerSuite
7897
echo ""
7998
echo "Running syntax analysis tests..."

0 commit comments

Comments
 (0)