Skip to content

Run Robot Framework tests #13

Run Robot Framework tests

Run Robot Framework tests #13

name: run-robot-tests
run-name: Run Robot Framework tests
# Run workflow
on:
# For every push to repository
push:
# To any branch
branches:
- '*'
# For every pull request
pull_request:
# But ignore this paths
paths-ignore:
- 'LICENSE*'
- 'DOCKERFILE*'
- '**.gitignore'
- '**.md'
- '**.txt'
- '.github/ISSUE_TEMPLATE/**'
- '.github/dependabot.yml'
- 'docs/**'
- 'scripts/**'
# Define workflow jobs
jobs:
# Job runs Robot Framework tests against locally build image from current code
run-robot-tests:
# Ubuntu latest is sufficient system for run
runs-on: ubuntu-latest
# Define steps of job
steps:
# Get checkout action to get this repository
- uses: actions/checkout@v4
# Install defined Python version to run Robot Framework tests
- name: Install Python 3.9.x
# Get setup-python action to install Python
uses: actions/setup-python@v5
with:
# Set Python version to install
python-version: '3.9'
# Set architecture of Python to install
architecture: 'x64'
# Install required Python packages for running Robot Framework tests
- name: Install required Python packages
# Install required Python packages using pip
run: pip install -r test/robot/requirements.txt
# Install model_registry Python package from current code
- name: Install model_registry Python package
# Install model_registry package as editable using pip
run: pip install -e clients/python
# Start docker compose with locally build image from current code
- name: Start docker compose with local image
# Start docker compose in the background
run: docker compose -f docker-compose-local.yaml up --detach
# Run Robot Framework tests in REST mode against running docker compose
- name: Run Robot Framework tests (REST mode)
# Run Robot Framework tests in REST mode from test/robot directory
run: robot test/robot
# Run Robot Framework tests in Python mode against running docker compose
- name: Run Robot Framework tests (Python mode)
# Run Robot Framework tests in Python mode from test/robot directory
run: TEST_MODE=Python robot test/robot/MRandLogicalModel.robot
# Shutdown docker compose with locally build image from current code
- name: Shutdown docker compose with local image
# Shutdown docker compose running in the background
run: docker compose -f docker-compose-local.yaml down