Skip to content

Update README.md

Update README.md #52

Workflow file for this run

# 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 Cloud
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x, 15.x]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: |
npm install
- run: |
npx playwright test
- uses: actions/upload-artifact@v4
with:
name: test-results-${{ matrix.node-version }}
path: xray-report.xml
- run: |
npx playwright test
- name: "Import results to Xray"
id: xray
uses: mikepenz/[email protected]
with:
username: ${{ secrets.XRAYCLOUD_CLIENT_ID }}
password: ${{ secrets.XRAYCLOUD_CLIENT_SECRET }}
xrayCloud: "true"
xrayBaseUrl: ${{ secrets.XRAYCLOUD_BASE_URL }}
testFormat: "junit"
testPaths: "xray-report.xml"
testPlanKey: "${{ vars.XRAYCLOUD_TEST_PLAN_KEY }}"
projectKey: "${{ vars.JIRACLOUD_PROJECT_KEY }}"
testEnvironments: "NODE_${{ matrix.node-version }}"
- name: add link to Test Execution
run: |
echo "| Node.js | Link |" >> $GITHUB_STEP_SUMMARY
echo "| --- | --- |" >> $GITHUB_STEP_SUMMARY
echo "| - | Test Plan: [${{ vars.XRAYCLOUD_TEST_PLAN_KEY }}](https://xraytutorials.atlassian.net/browse/${{ vars.XRAYCLOUD_TEST_PLAN_KEY }}) | " >> $GITHUB_STEP_SUMMARY
echo "| ${{ matrix.node-version }} | Test Execution: [${{steps.xray.outputs.testExecKey}}](https://xraytutorials.atlassian.net/browse/${{steps.xray.outputs.testExecKey}}) | " >> $GITHUB_STEP_SUMMARY
#- name: Authenticate with Xray
# run: |
# cat cloud_auth.json.sample | sed s/CLIENT_ID/${{ secrets.XRAYCLOUD_CLIENT_ID }}/g | sed s/CLIENT_SECRET/${{ secrets.XRAYCLOUD_CLIENT_SECRET }}/g > cloud_auth.json
# echo token=$(curl -H "Content-Type: application/json" -X POST --data @"cloud_auth.json" ${{ secrets.XRAYCLOUD_BASE_URL }}/api/v1/authenticate| tr -d '"') >> $GITHUB_ENV
#- name: Import results to Xray (cloud)
# run: |
# curl -H "Content-Type: text/xml" -X POST -H "Authorization: Bearer ${{ env.token }}" --data @"xray-report.xml" "${{ secrets.XRAYCLOUD_BASE_URL }}/api/v2/import/execution/junit?projectKey=${{ secrets.JIRACLOUD_PROJECT_KEY }}&testPlanKey=${{ secrets.XRAYCLOUD_TEST_PLAN_KEY }}"