-
Notifications
You must be signed in to change notification settings - Fork 43
47 lines (41 loc) · 1.77 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# 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: CI with Xray server/DC
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: generate auxiliary file with env variables for newman
run: |
cat xrayserver.postman_environment.json.template | sed "s|JIRA_BASEURL_VALUE|${{ secrets.JIRASERVER_BASE_URL }}|g" | sed "s|JIRA_USERNAME_VALUE|${{ secrets.JIRASERVER_USERNAME }}|g" | sed "s|JIRA_PASSWORD_VALUE|${{ secrets.JIRASERVER_PASSWORD }}|g" > xrayserver.postman_environment.json
ls -la xrayserver.postman_environment.json
cat xrayserver.postman_environment.json
- name: Run tests using newman
run: npm install && npm test
- name: "Import results to Xray (server/DC)"
if: always()
uses: mikepenz/xray-action@v3
with:
username: ${{ secrets.JIRASERVER_USERNAME }}
password: ${{ secrets.JIRASERVER_PASSWORD }}
xrayCloud: "false"
xrayBaseUrl: ${{ secrets.JIRASERVER_BASE_URL }}
testFormat: "junit"
testPaths: "**/junit.xml"
testPlanKey: "${{ secrets.XRAYSERVER_TEST_PLAN_KEY }}"
projectKey: "${{ secrets.JIRASERVER_PROJECT_KEY }}"