Skip to content
This repository was archived by the owner on Jan 27, 2023. It is now read-only.

Commit ada2d88

Browse files
fix: added test case (#7)
* fix: added test case * refactor: changed where version is defined in test case * refactor: rewrote all the test-cases * refactor: changed ref for testing-remote-action case
1 parent 065287e commit ada2d88

File tree

2 files changed

+33
-18
lines changed

2 files changed

+33
-18
lines changed

.github/workflows/test.yaml

+25-16
Original file line numberDiff line numberDiff line change
@@ -9,27 +9,27 @@ env:
99
BRANCH_NAME: main
1010

1111
jobs:
12-
test-local-folder:
13-
runs-on: ubuntu-latest
14-
steps:
15-
- uses: actions/checkout@v3
16-
17-
# Doing this here to simulate already having the test suite within the repo
18-
- name: Checkout repo locally
19-
uses: actions/checkout@v3
20-
with:
21-
repository: liatrio/gatling-maven-showcase
22-
ref: ${{ env.BRANCH_NAME }}
23-
path: ./test
24-
25-
- name: Run Gatling Test Suite from local folder
26-
uses: ./
12+
# test-local-folder:
13+
# runs-on: ubuntu-latest
14+
# steps:
15+
# - uses: actions/checkout@v3
16+
17+
# # Doing this here to simulate already having the test suite within the repo
18+
# - name: Checkout repo locally
19+
# uses: actions/checkout@v3
20+
# with:
21+
# repository: liatrio/gatling-maven-showcase
22+
# ref: ${{ env.BRANCH_NAME }}
23+
# path: ./test
24+
25+
# - name: Run Gatling Test Suite from local folder
26+
# uses: ./
2727

2828
test-with-repo:
2929
runs-on: ubuntu-latest
3030
steps:
3131
- uses: actions/checkout@v3
32-
32+
3333
- name: Run Gatling Test Suite from repository
3434
uses: ./
3535
with:
@@ -47,3 +47,12 @@ jobs:
4747
repoName: liatrio/gatling-maven-showcase
4848
repoRef: ${{ env.BRANCH_NAME }}
4949
simulationClass: "simulations.GoogleStressSimulation"
50+
51+
testing-remote-action:
52+
runs-on: ubuntu-latest
53+
steps:
54+
- uses: liatrio/run-gatling@main
55+
with:
56+
repoName: liatrio/gatling-maven-showcase
57+
repoRef: ${{ env.BRANCH_NAME }}
58+
simulationClass: "simulations.GoogleStressSimulation"

action.yaml

+8-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ inputs:
1111
required: true
1212
testPath:
1313
description: "Path to the Gatling Test Suite"
14-
default: "./test"
14+
default: "test"
1515
required: true
1616
repoName:
1717
description: "Name of the repository to checkout ('org/repo')"
@@ -26,6 +26,9 @@ inputs:
2626
runs:
2727
using: "composite"
2828
steps:
29+
- name: Checkout action code
30+
uses: actions/checkout@v3
31+
2932
- name: Checkout Test Suite if not local
3033
if: ${{ !hashFiles(inputs.testPath) }}
3134
uses: actions/checkout@v3
@@ -40,7 +43,10 @@ runs:
4043
distribution: ${{ inputs.javaDistribution }}
4144
java-version: ${{ inputs.javaVersion }}
4245

43-
- run: mvn -f ${{ inputs.testPath }} gatling:test ${{ inputs.simulationClass != '' && '-Dgatling.simulationClass=' || '' }}${{ inputs.simulationClass }}
46+
- run: |
47+
ls -l $GITHUB_WORKSPACE/
48+
ls -l $GITHUB_WORKSPACE/test
49+
mvn -f $GITHUB_WORKSPACE/${{ inputs.testPath }} gatling:test ${{ inputs.simulationClass != '' && '-Dgatling.simulationClass=' || '' }}${{ inputs.simulationClass }}
4450
shell: bash
4551
4652
- name: Generate Job Summary

0 commit comments

Comments
 (0)