-
Notifications
You must be signed in to change notification settings - Fork 34
83 lines (75 loc) · 2.26 KB
/
node.js.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# This workflow will do a clean installation of node dependencies, cache/restore them, 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: Automation Test Execution
on:
push:
branches: [ master ]
jobs:
tests:
name: Test Execution
runs-on: windows-latest
steps:
- name: Checkout code from repository
uses: actions/checkout@v3
- name: Setting up Node.js 16
uses: actions/setup-node@v3
with:
node-version: 16
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Creating test suite
run: npm run create:suite SHEET=Regression --if-present
- name: Test execution
run: npm test
- name: Generating execution report
if: always()
run: npx ts-node ./src/framework/reporter/HTMLReporter.ts
- name: Upload test results
if: always()
uses: actions/upload-artifact@v3
with:
name: test-results
path: test-results
- name: Upload allure-results artifact
if: always()
uses: actions/upload-artifact@master
with:
name: allure-results
path: allure-results
retention-days: 30
generate_report:
name: Allure Report
runs-on: ubuntu-latest
if: always()
needs: [ tests ]
steps:
- name: Download Artifacts
uses: actions/download-artifact@v3
id: download
with:
name: allure-results
path: allure-results
- name: Get Allure history
uses: actions/checkout@v2
if: always()
continue-on-error: true
with:
ref: gh-pages
path: gh-pages
- name: Allure Report action
uses: simple-elf/allure-report-action@master
if: always()
id: allure-report
with:
allure_results: allure-results
gh_pages: gh-pages
allure_report: allure-report
allure_history: allure-history
- name: Deploy allure report to Github Pages
if: always()
uses: peaceiris/actions-gh-pages@v2
env:
PERSONAL_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PUBLISH_BRANCH: gh-pages
PUBLISH_DIR: allure-history