Skip to content

Commit

Permalink
update github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
jacqueline-57b committed Sep 24, 2024
1 parent 722fd3f commit f383bec
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/load_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,19 +55,20 @@ jobs:
run: |
TIMESTAMP=$(date +'%Y%m%d_%H%M%S')
echo "timestamp=$TIMESTAMP" >> $GITHUB_OUTPUT
echo "timestamp=$TIMESTAMP" >> $GITHUB_ENV
- name: Run Locust
if: ${{ github.event.inputs.requst-methold == 'GET' }}
run: |
echo ${{ steps.set_timestamp.outputs.timestamp }}
rm -rf ./test_report/*
locust -f src/test_scripts/test_get_api.py --headless -u ${{ github.event.inputs.number-of-users }} -r ${{ github.event.inputs.ramp-up }} --run-time ${{ github.event.inputs.run_time }} --host ${{ github.event.inputs.host }} --html ./test_report/load-test-report_${{ steps.set_timestamp.outputs.timestamp }}.html
continue-on-error: true

- name: Run Locust
if: ${{ github.event.inputs.requst-methold == 'POST' }}
run: |
rm -rf ./test_report/*
locust -f src/test_scripts/test_post_api.py --headless -u ${{ github.event.inputs.number-of-users }} -r ${{ github.event.inputs.ramp-up }} --run-time ${{ github.event.inputs.run_time }} --host ${{ github.event.inputs.host }} --html ./test_report/load-test-report_${{ steps.set_timestamp.outputs.timestamp }}.html
continue-on-error: true

- name: Deploy report to GitHub Pages
if: always()
Expand All @@ -84,4 +85,4 @@ jobs:
with:
name: hub-load-test-report
path: |
./test_report/
./test_report

0 comments on commit f383bec

Please sign in to comment.