84 lines
2.3 KiB
YAML
84 lines
2.3 KiB
YAML
# 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@v4
|
|
- name: Setting up Node.js 20
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 20
|
|
cache: 'npm'
|
|
- name: Install dependencies
|
|
run: npm ci && npx playwright install
|
|
- 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@v4
|
|
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@v4
|
|
id: download
|
|
with:
|
|
name: allure-results
|
|
path: allure-results
|
|
|
|
- name: Get Allure history
|
|
uses: actions/checkout@v4
|
|
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
|
|
|