Skip to content

Commit

Permalink
Spec file debugger 3
Browse files Browse the repository at this point in the history
  • Loading branch information
antowaddle committed Dec 18, 2024
1 parent 14accb3 commit 1b06a58
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,18 @@ jobs:
run: |
echo "Running Cypress tests for container $CONTAINER_INDEX..."
echo "Test Files: $TEST_FILES"
cd ./frontend && npm run test:cypress-ci -- --headless --no-sandbox --spec $(echo "$TEST_FILES" | tr ',' '\n' | awk -v container="$CONTAINER_INDEX" 'NR % 5 == container - 1' | tr '\n' ',')
# Generate the list of spec files for this container and trim trailing comma
SPEC_FILES=$(echo "$TEST_FILES" | tr ',' '\n' | awk -v container="$CONTAINER_INDEX" 'NR % 5 == container - 1' | tr '\n' ',' | sed 's/,$//')

# Check if SPEC_FILES is empty
if [ -z "$SPEC_FILES" ]; then
echo "No spec files found for container $CONTAINER_INDEX. Skipping Cypress tests."
exit 0
else
echo "Spec Files for this container: $SPEC_FILES"
cd ./frontend && npm run test:cypress-ci -- --headless --no-sandbox --spec "$SPEC_FILES"
fi
- uses: actions/upload-artifact@v4
if: ${{ always() }}
with:
Expand Down

0 comments on commit 1b06a58

Please sign in to comment.