Skip to content

fixed flaky test

fixed flaky test #37

Workflow file for this run

name: Run Robotframework Tests
on:
push:
branches:
- main
paths:
- "demo/**"
workflow_dispatch:
jobs:
setup-and-test:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Install Node.js
run: |
curl -sL https://deb.nodesource.com/setup_22.x | sudo -E bash -
sudo apt-get install -y nodejs
- name: Install Node Dependencies
run: npm install
working-directory: demo/todo-app
- name: Install Playwright Browser Dependencies
run: npx playwright install-deps
working-directory: demo
- name: Setup Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12.8"
- name: Setup Hatch
run: pipx install hatch
- name: Create Hatch Environment
run: hatch env create
working-directory: demo
- name: Deploy Webapps
run: hatch run start-webapps
working-directory: demo
- name: Run Test Cases
run: hatch run robotcode -p ci-dev robot --outputdir=reports tests/browser.robot
working-directory: demo
- name: Upload Test Results
if: always()
uses: actions/upload-artifact@v4
with:
name: robotframework-results
path: demo/reports
publish-test-results:
needs: setup-and-test
runs-on: ubuntu-latest
if: always()
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
token: ${{ secrets.GHP_TOKEN }}
- name: Download Artifacts
uses: actions/download-artifact@v4
with:
name: robotframework-results
path: artifacts
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Deploy to GitHub Pages
env:
GHP_TOKEN: ${{ secrets.GHP_TOKEN }}
run: |
rm -rf public
mkdir -p public/reports
cp -r artifacts/** public/reports/
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add public
git commit -m 'Deploy test results to GitHub Pages'
git push --force https://x-access-token:${GHP_TOKEN}@github.com/${{ github.repository }} HEAD:gh-pages