Skip to content

Commit

Permalink
just pass the node script
Browse files Browse the repository at this point in the history
  • Loading branch information
thomscoder committed Jan 16, 2025
1 parent ec70aa3 commit 4b17c5e
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion .github/workflows/pr-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,18 +54,35 @@ jobs:
- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: List directory contents
run: |
pwd
ls -la
ls -la scripts/
- name: Run tests
id: run-tests
continue-on-error: true
run: |
set +e # Don't exit on error
node ./scripts/runMinimalTests.js ${{ steps.get-target-branch.outputs.target_branch }} ${{ github.event.pull_request.head.ref }} 2>&1 | tee test_output.txt
if [ -f "./scripts/runMinimalTests.js" ]; then
echo "Found test script"
pnpm test:minimal:pr ${{ steps.get-target-branch.outputs.target_branch }} ${{ github.event.pull_request.head.ref }} 2>&1 | tee test_output.txt
else
echo "Error: Cannot find test script at ./scripts/runMinimalTests.js"
echo "Current directory: $(pwd)"
ls -la
ls -la scripts/
exit 1
fi
TEST_EXIT_CODE=${PIPESTATUS[0]}
# Prepare the output
echo "output<<EOF" >> $GITHUB_OUTPUT
cat test_output.txt >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
# Set the status based on exit code
if [ $TEST_EXIT_CODE -eq 0 ]; then
echo "status=success" >> $GITHUB_OUTPUT
else
Expand Down

0 comments on commit 4b17c5e

Please sign in to comment.