Skip to content

Commit

Permalink
Update behave.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
robbrad authored Dec 17, 2024
1 parent 268c3c1 commit cc2378f
Showing 1 changed file with 28 additions and 2 deletions.
30 changes: 28 additions & 2 deletions .github/workflows/behave.yml
Original file line number Diff line number Diff line change
Expand Up @@ -257,12 +257,38 @@ jobs:
# Untar Full Reports
- name: Untar Full Reports
if: github.event_name == 'schedule' || github.event_name == 'push'
run: for i in allure-history/tars/full/*.tar; do tar -xvf "$i" -C allure-history/full; done
run: |
shopt -s nullglob
for i in allure-history/tars/full/*.tar; do
tar -xvf "$i" -C allure-history/full
done
# Untar Partial Reports
- name: Untar Partial Reports
if: github.event_name == 'pull_request'
run: for i in allure-history/tars/partial/*.tar; do tar -xvf "$i" -C allure-history/partial; done
run: |
shopt -s nullglob
for i in allure-history/tars/partial/*.tar; do
tar -xvf "$i" -C allure-history/partial
done
# Create placeholder if full directory is empty (for schedule/push)
- name: Ensure Full Directory not empty
if: github.event_name == 'schedule' || github.event_name == 'push'
run: |
if [ ! "$(ls -A allure-history/full)" ]; then
echo "No files extracted, creating a placeholder file."
touch allure-history/full/.placeholder
fi
# Create placeholder if partial directory is empty (for pull_request)
- name: Ensure Partial Directory not empty
if: github.event_name == 'pull_request'
run: |
if [ ! "$(ls -A allure-history/partial)" ]; then
echo "No files extracted, creating a placeholder file."
touch allure-history/partial/.placeholder
fi
# Remove the Tar Files
- name: Remove Tar Reports
Expand Down

0 comments on commit cc2378f

Please sign in to comment.