Compare commits
3
Commits
acfe534938
...
v1.0.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
11ef1715ab | ||
|
|
7e59978f07 | ||
|
|
4ffd755fe7 |
@@ -18,13 +18,12 @@ on:
|
|||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
|
|
||||||
env:
|
|
||||||
NODE_VERSION: v24.12.0
|
|
||||||
RELEASE_REF: ${{ inputs.tag || github.ref_name }}
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
release:
|
release:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
NODE_VERSION: v24.12.0
|
||||||
|
RELEASE_REF: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.tag || github.ref_name }}
|
||||||
steps:
|
steps:
|
||||||
- name: Check out the tag
|
- name: Check out the tag
|
||||||
env:
|
env:
|
||||||
@@ -32,7 +31,8 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
case "$RELEASE_REF" in v[0-9]*.[0-9]*.[0-9]*) ;; *) echo "not a version tag: $RELEASE_REF" >&2; exit 1 ;; esac
|
case "$RELEASE_REF" in v[0-9]*.[0-9]*.[0-9]*) ;; *) echo "not a version tag: $RELEASE_REF" >&2; exit 1 ;; esac
|
||||||
git init -q .
|
git init -q .
|
||||||
git -c http.extraheader="AUTHORIZATION: bearer $GITHUB_TOKEN" fetch -q --depth 1 \
|
basic=$(printf 'x-access-token:%s' "$GITHUB_TOKEN" | base64 -w0)
|
||||||
|
git -c http.extraheader="AUTHORIZATION: basic $basic" fetch -q --depth 1 \
|
||||||
"https://github.com/$GITHUB_REPOSITORY" "refs/tags/$RELEASE_REF:refs/tags/$RELEASE_REF"
|
"https://github.com/$GITHUB_REPOSITORY" "refs/tags/$RELEASE_REF:refs/tags/$RELEASE_REF"
|
||||||
git checkout -q "refs/tags/$RELEASE_REF"
|
git checkout -q "refs/tags/$RELEASE_REF"
|
||||||
- name: Install Node
|
- name: Install Node
|
||||||
|
|||||||
+1
-1
@@ -51,7 +51,7 @@ for filename in "${BUILD_FILES[@]}"; do
|
|||||||
if [ -f "$filepath" ]; then
|
if [ -f "$filepath" ]; then
|
||||||
cat "$filepath" >> "$OUTPUT"
|
cat "$filepath" >> "$OUTPUT"
|
||||||
echo "" >> "$OUTPUT"
|
echo "" >> "$OUTPUT"
|
||||||
((file_count++))
|
file_count=$((file_count + 1))
|
||||||
else
|
else
|
||||||
echo "Warning: $filename not found, skipping" >&2
|
echo "Warning: $filename not found, skipping" >&2
|
||||||
fi
|
fi
|
||||||
|
|||||||
+3
-3
@@ -45,7 +45,7 @@ for test_file in "$TEST_DIR"/[0-9][0-9]_*.sql; do
|
|||||||
[ -f "$test_file" ] || continue
|
[ -f "$test_file" ] || continue
|
||||||
|
|
||||||
test_name=$(basename "$test_file" .sql)
|
test_name=$(basename "$test_file" .sql)
|
||||||
((total_files++))
|
total_files=$((total_files + 1))
|
||||||
|
|
||||||
output=$(psql -U "$PG_USER" -d "$DB" -f "$test_file" 2>&1)
|
output=$(psql -U "$PG_USER" -d "$DB" -f "$test_file" 2>&1)
|
||||||
exit_code=$?
|
exit_code=$?
|
||||||
@@ -59,7 +59,7 @@ for test_file in "$TEST_DIR"/[0-9][0-9]_*.sql; do
|
|||||||
total_fail=$((total_fail + file_fail))
|
total_fail=$((total_fail + file_fail))
|
||||||
|
|
||||||
if [ $exit_code -ne 0 ] || [ "$file_fail" -gt 0 ] || [ "$file_errors" -gt 0 ]; then
|
if [ $exit_code -ne 0 ] || [ "$file_fail" -gt 0 ] || [ "$file_errors" -gt 0 ]; then
|
||||||
((failed_files++))
|
failed_files=$((failed_files + 1))
|
||||||
echo " [FAIL] $test_name — ${file_pass} passed, ${file_fail} failed, ${file_errors} SQL error(s)"
|
echo " [FAIL] $test_name — ${file_pass} passed, ${file_fail} failed, ${file_errors} SQL error(s)"
|
||||||
# Print only failing lines for a focused view
|
# Print only failing lines for a focused view
|
||||||
if [ "$file_errors" -gt 0 ]; then
|
if [ "$file_errors" -gt 0 ]; then
|
||||||
@@ -69,7 +69,7 @@ for test_file in "$TEST_DIR"/[0-9][0-9]_*.sql; do
|
|||||||
echo "$output" | grep "CHECK FAIL:" | sed 's/^/ /'
|
echo "$output" | grep "CHECK FAIL:" | sed 's/^/ /'
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
((passed_files++))
|
passed_files=$((passed_files + 1))
|
||||||
echo " [PASS] $test_name — ${file_pass} assertion(s) passed"
|
echo " [PASS] $test_name — ${file_pass} assertion(s) passed"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|||||||
Reference in New Issue
Block a user