Skip to content

Commit

Permalink
Merge pull request #124 from reportportal/develop
Browse files Browse the repository at this point in the history
EPMRPP-82453 || Agent release 5.0.5
  • Loading branch information
Bam6ycha authored Mar 16, 2023
2 parents 0e6369e + 3386b55 commit f9e1b37
Show file tree
Hide file tree
Showing 10 changed files with 5,625 additions and 4,639 deletions.
9 changes: 4 additions & 5 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@
root = true

[*]
end_of_line = lf
insert_final_newline = true

[*.js]
indent_style = space
indent_size = 4

end_of_line = lf
charset = utf-8
indent_size = 2
trim_trailing_whitespace = true
insert_final_newline = true
8 changes: 3 additions & 5 deletions .github/workflows/CI-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,12 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v1
uses: actions/setup-node@v2
with:
node-version: 12.x
node-version: 18
- name: Clean install of node dependencies
run: npm ci
- name: Run lint
run: npm run lint
- name: Run tests
run: npm test
- name: Check coverage
- name: Run tests and check coverage
run: npm run test:coverage
16 changes: 7 additions & 9 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,14 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v1
uses: actions/setup-node@v2
with:
node-version: 12.x
node-version: 18
- name: Clean install of node dependencies
run: npm ci
- name: Run lint
run: npm run lint
- name: Run tests
run: npm test
- name: Check coverage
- name: Run tests and check coverage
run: npm run test:coverage

publish-to-npm-and-gpr:
Expand All @@ -30,9 +28,9 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v1
uses: actions/setup-node@v2
with:
node-version: 12.x
node-version: 18
registry-url: 'https://registry.npmjs.org'
- name: Clean install of node dependencies
run: npm ci
Expand All @@ -44,9 +42,9 @@ jobs:
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }}
- name: Set up Node.js
uses: actions/setup-node@v1
uses: actions/setup-node@v2
with:
node-version: 12.x
node-version: 18
registry-url: 'https://npm.pkg.github.com'
scope: '@reportportal'
- name: Publish to GPR
Expand Down
10 changes: 4 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,31 @@
### Added
- `RP_DESCRIPTION` & `RP.MODE` env variables support. Thanks to [Jonathan Carvalheiro](https://github.com/Jonathan-Carvalheiro)
### Fixed
- Log messages in RP shown without ANSI characters

## [5.0.4] - 2022-05-30
### Added
- Possibility to provide endpoint url via `RP_ENDPOINT` environment variable
- New [option](./README.md#loglaunchlink-flag) `logLaunchLink` to print launch url in console

### Fixed
- The duration of tests and suites is now displayed correctly
- The reporter will now wait for a report on all tests
- Security vulnerabilities
- Tests without describe block causes error [#82](https://github.com/reportportal/agent-js-jest/issues/82)

### Changed
- Package size reduced

## [5.0.3] - 2021-06-23
### Fixed
- Nested describe blocks are not visible in report

### Updated
- `@reportportal/client-javascript` version to the latest

### Added
- `restClientConfig` configuration property support (more details in [client-javascript](https://github.com/reportportal/client-javascript))

## [5.0.2] - 2021-02-09
### Added
- Debug flag, launch mode configuration properties

### Fixed
- Doesn't start a suite if test has no describe
- Vulnerable dependencies (lodash)
Expand All @@ -38,6 +37,5 @@
## [5.0.0] - 2020-06-11
### Added
- Full compatibility with ReportPortal version 5.* (see [reportportal releases](https://github.com/reportportal/reportportal/releases))

### Deprecated
- Previous package version (`@reportportal/reportportal-agent-jest`) will no longer supported by reportportal.io
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,10 @@ $ export RP_TOKEN=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
$ export RP_PROJECT_NAME=MY_AWESOME_PROJECT
$ export RP_ENDPOINT=MY_RP_ENDPOINT
$ export RP_LAUNCH=MY_COOL_LAUNCHER
$ export RP_DESCRIPTION=RP_DESCRIPTION
$ export RP_ATTRIBUTES=key:value,key:value,value
$ export RP_LAUNCH_ID=EXIST_LAUNCH_ID
$ export RP_MODE=DEBUG
```
This for your convenience in case you has a continuous job that run your tests and may post the results pointing to a different Report Portal definition of project, launcher name or tags.
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5.0.4
5.0.5-SNAPSHOT
4 changes: 3 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
* limitations under the License.
*/

const stripAnsi = require('strip-ansi');
const RPClient = require('@reportportal/client-javascript');
const getOptions = require('./utils/getOptions');
const {
Expand Down Expand Up @@ -198,8 +199,9 @@ class JestReportPortal {
}

_sendLog(message) {
const newMessage = stripAnsi(message);
const logObject = {
message,
message: newMessage,
level: logLevels.ERROR,
};
const { promise } = this.client.sendLog(this.tempStepId, logObject);
Expand Down
Loading

0 comments on commit f9e1b37

Please sign in to comment.