Skip to content

Update main.yml

Update main.yml #9

Workflow file for this run

name: JMeter Test
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
jmeter-test:
runs-on: self-hosted
steps:
- name: Get IP Address
id: ip
uses: candidob/[email protected]
- name: See IP Addresses
run: |
echo ${{ steps.ip.outputs.ipv4 }}
echo ${{ steps.ip.outputs.ipv6 }}
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'adopt'
- name: Download Apache JMeter
run: |
wget https://archive.apache.org/dist/jmeter/binaries/apache-jmeter-5.6.3.tgz
tar -xf apache-jmeter-5.6.3.tgz
sudo mv apache-jmeter-5.6.3 /opt/
echo 'export PATH=/opt/apache-jmeter-5.6.3/bin:$PATH' >> ~/.bashrc
source ~/.bashrc
- name: Run JMeter Test
run: |
/opt/apache-jmeter-5.6.3/bin/jmeter -n -t IP_Script.jmx -l test_results.jtl -j jmeter.log
- name: Upload Test Results
uses: actions/upload-artifact@v4
with:
name: jmeter-results
path: test_results.jtl
- name: Upload Logs
uses: actions/upload-artifact@v4
with:
name: jmeter-logs
path: jmeter.log