From f0d43cc644867dccb91c532bb184f25fd55cad1a Mon Sep 17 00:00:00 2001 From: Rodolphe Fontaine <30529563+Rodi26@users.noreply.github.com> Date: Tue, 15 Oct 2024 10:00:37 +0200 Subject: [PATCH] jmeter tests --- .github/docker | 0 .github/workflows/docker-build.MD | 28 +++++++++++++++++++++++++++ .github/workflows/run-jmeter-test.yml | 26 +++++++++++++++++++++++++ 3 files changed, 54 insertions(+) create mode 100644 .github/docker create mode 100644 .github/workflows/docker-build.MD create mode 100644 .github/workflows/run-jmeter-test.yml diff --git a/.github/docker b/.github/docker new file mode 100644 index 000000000..e69de29bb diff --git a/.github/workflows/docker-build.MD b/.github/workflows/docker-build.MD new file mode 100644 index 000000000..7129b5a38 --- /dev/null +++ b/.github/workflows/docker-build.MD @@ -0,0 +1,28 @@ +--- + name: Build to Docker Hub + + on: + push: + branches: [master] + + jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout the repository + uses: actions/checkout@v4 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Set up JDK 17 + uses: actions/setup-java@v3 + with: + java-version: '17' + distribution: 'temurin' + cache: maven + - name: Build & publish the project + run: mvn compile jib:build -X -DjibSerialize=true \ No newline at end of file diff --git a/.github/workflows/run-jmeter-test.yml b/.github/workflows/run-jmeter-test.yml new file mode 100644 index 000000000..212048367 --- /dev/null +++ b/.github/workflows/run-jmeter-test.yml @@ -0,0 +1,26 @@ +name: Test JMeter Action + +on: + push: + branches: + - master + pull_request: + branches: [master] + +jobs: + action_build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - name: Run JMeter Action on a test + uses: rbhadti94/apache-jmeter-action@v0.7.0 + with: + testFilePath: test/jmeter/petclinic_test_plan.jmx + outputReportsFolder: reports/ + args: "--loglevel INFO" + + - uses: actions/upload-artifact@v1 + with: + name: jmeter-test-results + path: reports/