Update action.yml
This commit is contained in:
+11
-6
@@ -266,24 +266,29 @@ runs:
|
||||
PYTEST_ARGS="--continue-on-collection-errors \
|
||||
--cov=${{ inputs.module-dir }} \
|
||||
--json-report \
|
||||
--json-report-file=markdown/pytest-report.json"
|
||||
--json-report-file=markdown/pytest-report.json \
|
||||
--capture=no"
|
||||
|
||||
case "${{ inputs.env }}" in
|
||||
pixi) CMD="pixi run pytest $TEST_PATH $PYTEST_ARGS > outputs/pytest-output.log 2>&1 || true" ;;
|
||||
conda) CMD="conda run -n myenv pytest $TEST_PATH $PYTEST_ARGS > outputs/pytest-output.log 2>&1 || true" ;;
|
||||
pip) CMD="pytest $TEST_PATH $PYTEST_ARGS > outputs/pytest-output.log 2>&1 || true" ;;
|
||||
pixi) CMD="pixi run pytest -s $TEST_PATH $PYTEST_ARGS > outputs/pytest-output.log 2>&1 || true" ;;
|
||||
conda) CMD="conda run -n myenv pytest -s $TEST_PATH $PYTEST_ARGS > outputs/pytest-output.log 2>&1 || true" ;;
|
||||
pip) CMD="pytest -s $TEST_PATH $PYTEST_ARGS > outputs/pytest-output.log 2>&1 || true" ;;
|
||||
esac
|
||||
|
||||
exec 1>>"$PRINTS"
|
||||
exec 2>>"$LOG_FILE"
|
||||
|
||||
cat > custom_cmd.sh <<EOS
|
||||
echo -e "\033[95m--- PRINTS of external processes (before pytest) ---\033[0m" >> "\$PRINTS"
|
||||
|
||||
${{ inputs.test-run-cmd }}
|
||||
|
||||
echo -e "\033[95m--- PRINTS of external processes (after pytest) ---\033[0m" >> "\$PRINTS"
|
||||
EOS
|
||||
|
||||
chmod +x custom_cmd.sh
|
||||
export CMD
|
||||
./custom_cmd.sh
|
||||
export CMD "$PRINTS"
|
||||
./custom_cmd.sh
|
||||
|
||||
echo "Exit Code: 0" >> $PRINTS
|
||||
|
||||
|
||||
Reference in New Issue
Block a user