Skip to content

Commit 114361b

Browse files
update workflow to have more descriptive names for steps and variables
1 parent 3ffb4b9 commit 114361b

File tree

2 files changed

+17
-6
lines changed

2 files changed

+17
-6
lines changed

.github/workflows/gatling-tests.yml

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
java-version: ${{ matrix.java }}
3636
distribution: "temurin"
3737
cache: "maven"
38-
38+
3939
- name: Start up softwares via Docker Compose
4040
run: |
4141
pwd
@@ -50,27 +50,36 @@ jobs:
5050

5151
- name: Copy Gatling Reports to docs folder
5252
if: always()
53+
working-directory: .
5354
run: |
54-
cd ..
5555
TIMESTAMP=$(date +"%Y-%m-%d_%H-%M-%S")
5656
REPORT_DIR="docs/gatling-reports/${TIMESTAMP}"
57+
echo "Creating report directory: ${REPORT_DIR}"
5758
mkdir -p "${REPORT_DIR}"
59+
5860
if [ -d "gatling-tests/target/gatling" ]; then
61+
echo "Found Gatling reports directory"
62+
ls -la gatling-tests/target/gatling/
5963
cp -r gatling-tests/target/gatling/* "${REPORT_DIR}/"
6064
echo "Reports copied successfully to ${REPORT_DIR}"
6165
ls -la "${REPORT_DIR}/"
6266
else
63-
echo "No Gatling reports found"
67+
echo "ERROR: No Gatling reports found at gatling-tests/target/gatling"
68+
exit 0
6469
fi
6570
shell: bash
6671

6772
- name: Commit and Push Gatling Reports
6873
if: always() && github.ref == 'refs/heads/main'
74+
working-directory: .
6975
run: |
70-
cd ..
7176
git config --local user.email "github-actions[bot]@users.noreply.github.com"
7277
git config --local user.name "github-actions[bot]"
7378
git add docs/gatling-reports/
74-
git diff --staged --quiet || git commit -m "Update Gatling performance test reports [skip ci]"
75-
git push
79+
if git diff --staged --quiet; then
80+
echo "No changes to commit"
81+
else
82+
git commit -m "Update Gatling performance test reports [skip ci]"
83+
git push
84+
fi
7685
shell: bash

docs/gatling-reports/.gitkeep

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# This directory stores Gatling performance test reports
2+
# Reports are automatically generated and committed by GitHub Actions

0 commit comments

Comments
 (0)