mirror of
https://github.com/Ukendio/jecs.git
synced 2025-04-25 09:30:03 +00:00
Unit testing init PR
This commit is contained in:
parent
96f706f8df
commit
04ef154193
2 changed files with 20 additions and 0 deletions
1
.github/workflows/analysis.yaml
vendored
1
.github/workflows/analysis.yaml
vendored
|
@ -17,3 +17,4 @@ jobs:
|
||||||
- name: Analyze
|
- name: Analyze
|
||||||
run: |
|
run: |
|
||||||
output=$(luau-analyze src || true) # Suppress errors for now.
|
output=$(luau-analyze src || true) # Suppress errors for now.
|
||||||
|
./gh-warn-luau-analyze.sh "$output"
|
||||||
|
|
19
.github/workflows/gh-warn-luau-analyze.sh
vendored
Normal file
19
.github/workflows/gh-warn-luau-analyze.sh
vendored
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
# Parse the output and generate GitHub Actions warnings
|
||||||
|
while IFS="" read -r line || [ -n "$line" ]; do
|
||||||
|
|
||||||
|
# Check if the line contains the error format
|
||||||
|
if [[ "$line" == *"TypeError:"* ]]; then
|
||||||
|
# Extract the file name and line number using string manipulation
|
||||||
|
file_line="${line%%:*}" # Get the part before the first colon
|
||||||
|
message="${line#*: TypeError: }" # Get the message after "TypeError: "
|
||||||
|
|
||||||
|
# Extract the file and line number
|
||||||
|
file="${file_line%(*}" # Get the file name (everything before the '(')
|
||||||
|
location="${file_line#*()}"; # Get the part inside parentheses (line and column)
|
||||||
|
line_number="${location%%,*}"; # Extract the line number
|
||||||
|
column_number="${location#*,}"; # Extract the column number
|
||||||
|
|
||||||
|
# Generate GitHub Actions warning
|
||||||
|
echo "::warning file=${file},line=${line_number},col=${column_number}::${message}"
|
||||||
|
fi
|
||||||
|
done
|
Loading…
Reference in a new issue