Regression Tests #48
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: Regression Tests | |
on: | |
push: # Run when changes pushed to any branch | |
schedule: # Run as per cron shedule on default branch (master) | |
- cron: '13 13 13 3,6,9,12 *' | |
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions | |
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule | |
# https://crontab.guru/#13_13_13_3,6,9,12_* | |
jobs: | |
Regression_Tests: | |
strategy: | |
max-parallel: 8 | |
matrix: | |
# python: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.x'] | |
# python: ['3.7'] | |
python: ['3.x', '3.11', '3.10', '3.9', '3.8', '3.7'] | |
platform: [ubuntu-latest, macos-latest, windows-latest] | |
fail-fast: false | |
runs-on: ${{ matrix.platform }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Random Offset | |
shell: python | |
run: | | |
import random | |
import time | |
t = random.randint(1,120) | |
print("Sleeping", t, "seconds...") | |
time.sleep(t) | |
print("Done") | |
- name: "Apt Update" | |
if: ${{ matrix.platform == 'ubuntu-latest' }} | |
run: | | |
sudo apt update -y | |
- name: "Apt Upgrade" | |
if: ${{ matrix.platform == 'ubuntu-latest' }} | |
run: | | |
sudo apt upgrade -y | |
- name: "Ubuntu Installs" | |
if: ${{ matrix.platform == 'ubuntu-latest' }} | |
run: | | |
sudo apt install -y scrot fluxbox | |
sudo apt list --installed | |
- name: "Ubuntu Xvfb" | |
if: ${{ matrix.platform == 'ubuntu-latest' }} | |
run: | | |
export DISPLAY=:13.0 | |
Xvfb :13 -screen 0 1920x1080x24 > /dev/null 2>&1 & | |
# xauth with complain unless ~/.Xauthority exists | |
touch ~/.Xauthority | |
# To view a listing of the .Xauthority file, enter the following | |
xauth list | |
sleep 1 | |
# fluxbox | |
fluxbox & | |
- name: Install NodeJS for Browser Library | |
uses: actions/setup-node@v4 | |
- name: Install Pip Requirements | |
run: pip install -r Regression_Tests/pip_requirements.txt | |
- name: Install playwright Requirements | |
run: npx playwright install-deps | |
- name: Run rfbrowser init for Browser Library | |
run: rfbrowser init | |
- name: Robot Framework | |
# run: robot --outputdir Regression_Tests/Logs/${{ matrix.platform }}_${{ matrix.python }} -v STT_MIN:1 -v STT_MAX:5 Regression_Tests | |
run: robot --outputdir Regression_Tests/Logs/${{ matrix.platform }}_${{ matrix.python }} -e Performance Regression_Tests | |
env: | |
DISPLAY: :13.0 | |
MATRIX_PLATFORM: ${{ matrix.platform }} | |
MATRIX_PYTHON: ${{ matrix.python }} | |
- name: Archive Agent Logs | |
if: ${{ success() }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Regression_Tests-${{ matrix.platform }}-${{ matrix.python }} | |
path: Regression_Tests/Logs/${{ matrix.platform }}_${{ matrix.python }} | |
retention-days: 15 | |
- name: Archive Agent Logs (longer retention if failed) | |
if: ${{ failure() }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Regression_Tests-${{ matrix.platform }}-${{ matrix.python }} | |
path: Regression_Tests/Logs/${{ matrix.platform }}_${{ matrix.python }} | |
retention-days: 90 |