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

fix: generating dist/index.js prior, regenerated yarn.lock #5

Merged
merged 1 commit into from
May 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
node_modules/
dist/
node_modules/
10 changes: 4 additions & 6 deletions action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,14 @@ inputs:
required: true
repoName:
description: "Name of the repository to checkout ('org/repo')"
required: false
repoRef:
description: "Tag, Branch, or Commit SHA for the Test Suite repository"
default: "main"
required: false
simulationClass:
description: "Full classpath of the simulation to run"
required: false
runs:
using: "composite"
steps:
Expand All @@ -36,13 +39,8 @@ runs:
with:
distribution: ${{ inputs.javaDistribution }}
java-version: ${{ inputs.javaVersion }}
- run: mvn -f ${{ inputs.testPath }} gatling:test ${{ inputs.simulationClass != '' && '-Dgatling.simulationClass=' || '' }}${{ inputs.simulationClass }}
shell: bash

- uses: actions/setup-node@v3
with:
node-version: '16'
- run: yarn install && yarn run build
- run: mvn -f ${{ inputs.testPath }} gatling:test ${{ inputs.simulationClass != '' && '-Dgatling.simulationClass=' || '' }}${{ inputs.simulationClass }}
shell: bash

- name: Generate Job Summary
Expand Down
107 changes: 107 additions & 0 deletions dist/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
/******/ (() => { // webpackBootstrap
/******/ var __webpack_modules__ = ({

/***/ 932:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {

const fs = __nccwpck_require__(147);

module.exports = async ({github, context, core}) => {
const testPath = process.env.TEST_PATH
const lastRuns = fs.readFileSync(`${testPath}/target/gatling/lastRun.txt`).toString().trim().split('\n');

for(const run of lastRuns) {
const results = JSON.parse(fs.readFileSync(`${testPath}/target/gatling/${run}/js/stats.json`).toString());
let tableContent = [
[
{data: 'Request', header: true},
{data: 'Success ✅', header: true},
{data: 'Errors ❌', header: true},
{data: 'Min', header: true},
{data: 'Max', header: true},
{data: 'Avg.', header: true},
{data: 'Std. Dev.', header: true},
{data: 'RPS', header: true},
]
];

for(const result in results.contents) {
const requestMetrics = results.contents[result].stats;
tableContent.push([
requestMetrics.name,
requestMetrics.numberOfRequests.ok.toString(),
requestMetrics.numberOfRequests.ko.toString(),
requestMetrics.minResponseTime.total.toString(),
requestMetrics.maxResponseTime.total.toString(),
requestMetrics.meanResponseTime.total.toString(),
requestMetrics.standardDeviation.total.toString(),
requestMetrics.meanNumberOfRequestsPerSecond.total.toString(),
]);
}

await core.summary
.addHeading(`Results for ${run}`)
.addTable(tableContent)
.addQuote('All times are in millisecond (ms). RPS means "Requests per Second"')
.write()
}
}


/***/ }),

/***/ 147:
/***/ ((module) => {

"use strict";
module.exports = require("fs");

/***/ })

/******/ });
/************************************************************************/
/******/ // The module cache
/******/ var __webpack_module_cache__ = {};
/******/
/******/ // The require function
/******/ function __nccwpck_require__(moduleId) {
/******/ // Check if module is in cache
/******/ var cachedModule = __webpack_module_cache__[moduleId];
/******/ if (cachedModule !== undefined) {
/******/ return cachedModule.exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = __webpack_module_cache__[moduleId] = {
/******/ // no module.id needed
/******/ // no module.loaded needed
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ var threw = true;
/******/ try {
/******/ __webpack_modules__[moduleId](module, module.exports, __nccwpck_require__);
/******/ threw = false;
/******/ } finally {
/******/ if(threw) delete __webpack_module_cache__[moduleId];
/******/ }
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/************************************************************************/
/******/ /* webpack/runtime/compat */
/******/
/******/ if (typeof __nccwpck_require__ !== 'undefined') __nccwpck_require__.ab = __dirname + "/";
/******/
/************************************************************************/
/******/
/******/ // startup
/******/ // Load entry module and return exports
/******/ // This entry module is referenced by other modules so it can't be inlined
/******/ var __webpack_exports__ = __nccwpck_require__(932);
/******/ module.exports = __webpack_exports__;
/******/
/******/ })()
;
17 changes: 0 additions & 17 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,6 @@
# yarn lockfile v1


"@actions/core@^1.8.0":
version "1.8.1"
resolved "https://registry.yarnpkg.com/@actions/core/-/core-1.8.1.tgz#3cdde366654b98764e63633a08dba6703131e274"
integrity sha512-LuFg2O/+rRrYxrdafnqH9mx6ADszKzQAhDuEhhMQIh47tsXzWkW4wXY5zvscqJ4KDywyJX0LA0pAESPLUjZXvw==
dependencies:
"@actions/http-client" "^2.0.0"

"@actions/http-client@^2.0.0":
version "2.0.0"
resolved "https://registry.yarnpkg.com/@actions/http-client/-/http-client-2.0.0.tgz#518c4af1e7045769d3e2ad8c2ce7f8b05224a9b3"
integrity sha512-fm1+OPPey5ypgStT9K8zbBhICj4J4UV/TJIHDhuWlkb8KyJaAtjcZK184dTqul0dV0nPKX97FNtDXX20BTLXSA==

"@babel/code-frame@^7.0.0":
version "7.16.7"
resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.16.7.tgz#44416b6bd7624b998f5b1af5d470856c40138789"
Expand Down Expand Up @@ -3118,11 +3106,6 @@ trim-newlines@^3.0.0:
resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-3.0.1.tgz#260a5d962d8b752425b32f3a7db0dcacd176c144"
integrity sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw==

tunnel@^0.0.6:
version "0.0.6"
resolved "https://registry.yarnpkg.com/tunnel/-/tunnel-0.0.6.tgz#72f1314b34a5b192db012324df2cc587ca47f92c"
integrity sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==

type-fest@^0.16.0:
version "0.16.0"
resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.16.0.tgz#3240b891a78b0deae910dbeb86553e552a148860"
Expand Down