debug(ci): simplify debug workflow to isolate failure
This commit is contained in:
@@ -21,33 +21,11 @@ jobs:
|
|||||||
- name: Install Nim dependencies
|
- name: Install Nim dependencies
|
||||||
run: nimble install --depsOnly -y
|
run: nimble install --depsOnly -y
|
||||||
|
|
||||||
- name: Compile and run tests
|
- name: Compile and run minimal test
|
||||||
run: |
|
run: nim c -d:ssl --threads:on --path:src -r tests/test_minimal.nim
|
||||||
nim c -d:ssl --threads:on --path:src tests/test_all.nim > compile.log 2>&1
|
|
||||||
COMPILE_EXIT=$?
|
|
||||||
tail -n 50 compile.log
|
|
||||||
if [ $COMPILE_EXIT -ne 0 ]; then
|
|
||||||
echo "COMPILE_FAILED=1" >> $GITHUB_ENV
|
|
||||||
echo "LOG=$(cat compile.log | sed 's/"/\\"/g' | head -c 6000)" >> $GITHUB_ENV
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
./tests/test_all > run.log 2>&1
|
|
||||||
RUN_EXIT=$?
|
|
||||||
tail -n 50 run.log
|
|
||||||
if [ $RUN_EXIT -ne 0 ]; then
|
|
||||||
echo "RUN_FAILED=1" >> $GITHUB_ENV
|
|
||||||
echo "LOG=$(cat run.log | sed 's/"/\\"/g' | head -c 6000)" >> $GITHUB_ENV
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Create issue on failure
|
- name: Compile test_all
|
||||||
if: failure()
|
run: nim c -d:ssl --threads:on --path:src tests/test_all.nim
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
- name: Run test_all binary
|
||||||
run: |
|
run: timeout 60 ./tests/test_all || echo "EXIT_CODE=$?"
|
||||||
BODY="Debug failure log:\n\n\`\`\`\n${LOG}\n\`\`\`"
|
|
||||||
curl -s -X POST \
|
|
||||||
-H "Authorization: token $GITHUB_TOKEN" \
|
|
||||||
-H "Content-Type: application/json" \
|
|
||||||
-d "{\"title\":\"CI Debug: test failure on ${{ github.sha }}\",\"body\":\"$BODY\"}" \
|
|
||||||
https://api.github.com/repos/${{ github.repository }}/issues
|
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
import std/unittest
|
||||||
|
import barabadb/core/types
|
||||||
|
|
||||||
|
suite "Minimal":
|
||||||
|
test "Value creation":
|
||||||
|
let v = Value(kind: vkInt, intVal: 42)
|
||||||
|
check v.intVal == 42
|
||||||
Reference in New Issue
Block a user