Skip to content

Commit

Permalink
Merge pull request #63 from reportportal/develop
Browse files Browse the repository at this point in the history
Release 5.1.1
  • Loading branch information
AmsterGet authored Jun 26, 2024
2 parents 8ae3d6d + 6e2d1c3 commit 09e4692
Show file tree
Hide file tree
Showing 10 changed files with 264 additions and 106 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/CI-pipeline.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2021 EPAM Systems
# Copyright 2024 EPAM Systems
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
Expand Down Expand Up @@ -28,9 +28,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18
- name: Install of node dependencies
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2021 EPAM Systems
# Copyright 2024 EPAM Systems
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
Expand All @@ -22,9 +22,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18
- name: Install of node dependencies
Expand All @@ -41,9 +41,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18
registry-url: 'https://registry.npmjs.org'
Expand All @@ -59,7 +59,7 @@ jobs:
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }}
- name: Set up Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18
registry-url: 'https://npm.pkg.github.com'
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2021 EPAM Systems
# Copyright 2024 EPAM Systems
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
Expand Down Expand Up @@ -33,7 +33,7 @@ jobs:
releaseVersion: ${{ steps.exposeVersion.outputs.releaseVersion }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Read version
id: readVersion
run: |
Expand Down Expand Up @@ -78,9 +78,9 @@ jobs:
versionInfo: ${{ steps.readChangelogEntry.outputs.log_entry }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup NodeJS
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: '12'
- name: Configure git
Expand Down Expand Up @@ -139,7 +139,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Create Release
id: createRelease
uses: actions/create-release@v1
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
### Changed
- `@reportportal/client-javascript` bumped to version `5.1.4`.
### Security
- Updated versions of vulnerable packages (braces, ws).

## [5.1.0] - 2024-02-06
### Added
Expand Down
209 changes: 158 additions & 51 deletions README.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5.1.0
5.1.1-SNAPSHOT
100 changes: 71 additions & 29 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"test:coverage": "jest --coverage"
},
"dependencies": {
"@reportportal/client-javascript": "^5.1.1",
"@reportportal/client-javascript": "~5.1.4",
"@wdio/reporter": "^7.31.1",
"json-stringify-safe": "^5.0.1"
},
Expand Down
23 changes: 14 additions & 9 deletions src/reporter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,14 @@ export class Reporter extends WDIOReporter {

constructor(options: Partial<Reporters.Options>) {
super(options);

const agentInfo = getAgentInfo();
const clientConfig = getClientConfig(options);
this.options = {
seleniumCommandsLogLevel: 'info',
launchId: process.env.RP_LAUNCH_ID || options.launchId,
...options,
};
const agentInfo = getAgentInfo();
const clientConfig = getClientConfig(this.options);

this.syncReporting = false;
this.client = new RPClient(clientConfig, agentInfo);
this.storage = new Storage();
Expand Down Expand Up @@ -240,11 +241,13 @@ export class Reporter extends WDIOReporter {
async onRunnerEnd(): Promise<void> {
try {
await this.client.getPromiseFinishAllItems(this.tempLaunchId);
const { promise } = await this.client.finishLaunch(this.tempLaunchId, {
...(this.customLaunchStatus && { status: this.customLaunchStatus }),
});
promiseErrorHandler(promise);
await promise;
if (!this.options.launchId) {
const { promise } = await this.client.finishLaunch(this.tempLaunchId, {
...(this.customLaunchStatus && { status: this.customLaunchStatus }),
});
promiseErrorHandler(promise);
await promise;
}
this.tempLaunchId = null;
this.customLaunchStatus = null;
} catch (e) {
Expand Down Expand Up @@ -358,7 +361,9 @@ export class Reporter extends WDIOReporter {
}

sendLaunchLog(log: LogRQ): void {
this.sendLog(this.tempLaunchId, log);
if (this.tempLaunchId) {
this.sendLog(this.tempLaunchId, log);
}
}

sendLog(tempId: string, { level, message = '', file }: LogRQ): void {
Expand Down
2 changes: 1 addition & 1 deletion version_fragment
Original file line number Diff line number Diff line change
@@ -1 +1 @@
minor
patch

0 comments on commit 09e4692

Please sign in to comment.