-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
bugSomething isn't workingSomething isn't workingenhancementNew feature or requestNew feature or request
Description
Create a workflow for running LFC.sh and checking if it ran successfully.
There was a try to do it before, however unsuccessful due to script hanging:
name: LFC Script CI
on:
push:
branches: [main]
pull_request:
branches: ["*"]
jobs:
test_lfc_script:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Make LFC.sh executable
run: chmod +x LFC/LFC.sh
- name: Run LFC.sh and verify output
run: |
set -e
OUTPUT_DIR="/tmp/lfc_output"
TARBALL="/tmp/lfc_output.tar.gz"
EXTRACT_DIR="/tmp/extracted_output"
sudo ./LFC/LFC.sh "$OUTPUT_DIR"
mkdir -p "$EXTRACT_DIR"
tar -xzf "$TARBALL" -C "$EXTRACT_DIR"
LOG_FILE_PATH="$EXTRACT_DIR/$(basename "$OUTPUT_DIR")/log_file.log"
if [ -f "$LOG_FILE_PATH" ]; then
echo "log_file.log found."
if grep -q "Artifact collection completed" "$LOG_FILE_PATH"; then
echo "Artifact collection completed message found in log."
else
echo "Error: Artifact collection completed message NOT found in log."
cat "$LOG_FILE_PATH"
exit 1
fi
else
echo "Error: log_file.log not found."
ls -R "$EXTRACT_DIR"
exit 1
fi
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingenhancementNew feature or requestNew feature or request