Skip to content

Commit

Permalink
Merge
Browse files Browse the repository at this point in the history
  • Loading branch information
CMCunha committed May 11, 2023
2 parents c353b98 + 529c9f2 commit ba43be5
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 1 deletion.
62 changes: 62 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Node.js CI

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
inputs:
testExecKey:
description: 'Test Exec ID from Xray'
default: ''
required: true
type: string
projectKey:
description: 'Project ID from Xray'
default: ''
required: true
type: string
jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [15.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v2
- name: Output Inputs
run: echo "${{ toJSON(github.event.inputs) }}"
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: |
npm install
npm i -D @playwright/test
npx playwright install
- name: Run tests
continue-on-error: true
run: |
PLAYWRIGHT_JUNIT_OUTPUT_NAME=xray-report.xml npx playwright test
- name: Output results file
run: |
cat xray-report.xml
- name: "Import results to Xray"
uses: mikepenz/[email protected]
with:
username: ${{ secrets.JIRA_USERNAME }}
password: ${{ secrets.JIRA_PASSWORD }}
xrayCloud: "false"
xrayBaseUrl: ${{ secrets.JIRA_BASEURL }}
testFormat: "junit"
testPaths: "**/xray-report.xml"
testExecKey: "${{ inputs.testExecKey }}"
projectKey: "${{ inputs.projectKey }}"
testEnvironments: "NODE_${{ matrix.node-version }}"
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ For Xray specific questions, please contact [Xray's support team](https://jira.g

## LICENSE

[BSD 3-Clause](LICENSE)
[BSD 3-Clause](LICENSE)

0 comments on commit ba43be5

Please sign in to comment.