xxxxxxxxxx
name: GH-Actions-Cypress-Cucumber
on:
push:
branches: [ "main", "master" ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
cypress-run:
# runs-on: ubuntu-latest
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/setup-node@v2
with:
node-version: '14.x'
- name: Install dependencies
run: npm ci
- name: Install Cypress
run: npm install cypress --save-dev
- name: Install cypress-cucumber-preprocessor
run: npm install @badeball/cypress-cucumber-preprocessor
- name: Install cypress-browserify-preprocessor
run: npm install --save-dev @cypress/browserify-preprocessor
- name: Install reporter dev
run: npm install --save-dev mocha-allure-reporter allure-commandline
- name: Run Cypress_cucumber tests
run: npx cypress run --browser chrome --reporter mocha-allure-reporter
- name: Generate Report
if: always()
run: allure generate allure-results --clean
- name: Upload Results
uses: actions/upload-artifact@v1
if: always()
with:
name: allure-results
path: ./allure-results
- name: Publishing Allure artifact to Github Actions
uses: actions/upload-artifact@v2
if: always()
with:
name: allure-report
path: allure-report
- name: Deploy to pages
if: always()
uses: peaceiris/actions-gh-pages@v3.7.3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: allure-report
xxxxxxxxxx
name: GH-Actions-Cypress-Cucumber
on:
push:
branches: [ "main", "master" ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
cypress-run:
# runs-on: ubuntu-latest
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/setup-node@v2
with:
node-version: '14.x'
- name: Install dependencies
run: npm ci
- name: Install Cypress
run: npm install cypress --save-dev
- name: Install cypress-cucumber-preprocessor
run: npm install @badeball/cypress-cucumber-preprocessor
- name: Install cypress-browserify-preprocessor
run: npm install --save-dev @cypress/browserify-preprocessor
- name: Install HTML reporter
run: npm install multiple-cucumber-html-reporter --save-dev
- name: Run Cypress_cucumber tests
run: npx cypress run
- name: Generate Report
if: always()
run: node cucumber-html-report.js
- name: Upload Results
uses: actions/upload-artifact@v1
if: always()
with:
name: HTML results
path: ./reports/cucumber-htmlreport.html
- name: Publishing Allure artifact to Github Actions
uses: actions/upload-artifact@v2
if: always()
with:
name: HTML-report
path: ./reports/cucumber-htmlreport.html
- name: Deploy to pages
if: always()
uses: peaceiris/actions-gh-pages@v3.7.3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: ./reports/cucumber-htmlreport.html