Build gh-pages #33
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: playwright-allure-report | |
on: | |
push: | |
branches: [main, master] | |
pull_request: | |
branches: [main, master] | |
jobs: | |
test: | |
name: Run end-to-end tests | |
timeout-minutes: 60 | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- name: Install dependencies | |
run: npm ci | |
- name: Install Playwright Browsers | |
run: npx playwright install --with-deps | |
- name: Run Playwright tests | |
run: npx playwright test | |
# - name: Configure Git | |
# run: | | |
# git config user.name "Radomyr Horban" | |
# git config user.email "[email protected]" | |
#!new codee | |
allure: | |
name: Generate Allure Report | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
# ! create a new branch first | |
- name: Create and push `allure-report-gh` branch | |
run: | | |
git checkout -b allure-report | |
git add allure-results | |
git commit -m "Add Allure report" | |
git push origin allure-report | |
- name: Get Allure history | |
uses: actions/checkout@v3 | |
if: always() | |
continue-on-error: true | |
with: | |
ref: allure-report-gh | |
path: allure-report-gh | |
- name: Allure Report action from marketplace | |
uses: simple-elf/allure-report-action@master | |
if: always() | |
id: allure-report | |
with: | |
allure_results: allure-results | |
gh_pages: allure-report-gh | |
allure_report: allure-report | |
#! do I have such a folder? | |
allure_history: allure-history | |
- name: Deploy report to GitHub Pages | |
if: always() | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
PERSONAL_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
PUBLISH_BRANCH: allure-report-gh | |
PUBLISH_DIR: allure-report | |
# - name: Copy Allure report | |
# run: | | |
# mkdir -p allure-results | |
# cp -r allure-report/* allure-results/ | |
#! Add a link | |
# - name: Post the link to the report | |
# if: always() | |
# uses: Sibz/github-status-action@v1 | |
# with: | |
# authToken: ${{secrets.GITHUB_TOKEN}} | |
# context: 'Test report' | |
# state: 'success' | |
# sha: ${{ github.event.pull_request.head.sha || github.sha}} |