Merge pull request #507 from andy-kru/dependency-upgrades #182
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: Robot Framework in Docker | |
on: | |
push: | |
# Publish `master` as Docker `latest` image. | |
# Release branches will trigger the creation of a git tag if the build is successful | |
branches: | |
- master | |
- release/* | |
# Run tests for any PRs. | |
pull_request: | |
env: | |
# The image name | |
IMAGE_NAME: docker-robot-framework:ci | |
jobs: | |
# Build and run tests. | |
# See also https://docs.docker.com/docker-hub/builds/automated-testing/ | |
build: | |
runs-on: ubuntu-latest | |
# run all our tests on each browser | |
strategy: | |
matrix: | |
include: | |
- browser: "chrome" | |
- browser: "edge" | |
- browser: "firefox" | |
env: | |
BROWSER: ${{ matrix.browser }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Build image | |
run: | |
podman build . --tag $IMAGE_NAME --file Dockerfile | |
- name: Basic Test | |
run: | | |
podman run --shm-size=1g \ | |
-v `pwd`/test/browser-library.robot:/opt/robotframework/tests/browser-library.robot:Z \ | |
-v `pwd`/test/faker.robot:/opt/robotframework/tests/faker.robot:Z \ | |
-v `pwd`/test/requests.robot:/opt/robotframework/tests/requests.robot:Z \ | |
-v `pwd`/test/selenium.robot:/opt/robotframework/tests/selenium.robot:Z \ | |
-v `pwd`/test/timezones.robot:/opt/robotframework/tests/timezones.robot:Z \ | |
-e BROWSER=$BROWSER \ | |
$IMAGE_NAME | |
- name: Test dependency installation | |
run: | | |
podman run --shm-size=1g \ | |
-v `pwd`/test/pip-dependencies/main.robot:/opt/robotframework/tests/pip-dependencies.robot:Z \ | |
-v `pwd`/test/pip-dependencies/requirements.txt:/opt/robotframework/pip-requirements.txt:Z \ | |
-e BROWSER=$BROWSER \ | |
$IMAGE_NAME | |
- name: Colour Depth 16 Test | |
run: | | |
podman run --shm-size=1g \ | |
-v `pwd`/test/browser-library.robot:/opt/robotframework/tests/browser-library.robot:Z \ | |
-v `pwd`/test/selenium.robot:/opt/robotframework/tests/selenium.robot:Z \ | |
-e BROWSER=$BROWSER \ | |
-e SCREEN_COLOUR_DEPTH=16 \ | |
$IMAGE_NAME | |
- name: Screen Width 800x600 Test | |
run: | | |
podman run --shm-size=1g \ | |
-v `pwd`/test/browser-library.robot:/opt/robotframework/tests/browser-library.robot:Z \ | |
-v `pwd`/test/selenium.robot:/opt/robotframework/tests/selenium.robot:Z \ | |
-e BROWSER=$BROWSER \ | |
-e SCREEN_WIDTH=800 \ | |
-e SCREEN_HEIGHT=600 \ | |
$IMAGE_NAME | |
- name: Screen Width 1024x768 Test | |
run: | | |
podman run --shm-size=1g \ | |
-v `pwd`/test/browser-library.robot:/opt/robotframework/tests/browser-library.robot:Z \ | |
-v `pwd`/test/selenium.robot:/opt/robotframework/tests/selenium.robot:Z \ | |
-e BROWSER=$BROWSER \ | |
-e SCREEN_WIDTH=1024 \ | |
-e SCREEN_HEIGHT=768 \ | |
$IMAGE_NAME | |
- name: Screen Width 1280x1024 Test | |
run: | | |
podman run --shm-size=1g \ | |
-v `pwd`/test/browser-library.robot:/opt/robotframework/tests/browser-library.robot:Z \ | |
-v `pwd`/test/selenium.robot:/opt/robotframework/tests/selenium.robot:Z \ | |
-e BROWSER=$BROWSER \ | |
-e SCREEN_WIDTH=1280 \ | |
-e SCREEN_HEIGHT=1024 \ | |
$IMAGE_NAME | |
- name: Screen Width 2560x1440 Test | |
run: | | |
podman run --shm-size=1g \ | |
-v `pwd`/test/browser-library.robot:/opt/robotframework/tests/browser-library.robot:Z \ | |
-v `pwd`/test/selenium.robot:/opt/robotframework/tests/selenium.robot:Z \ | |
-e BROWSER=$BROWSER \ | |
-e SCREEN_WIDTH=2560 \ | |
-e SCREEN_HEIGHT=1440 \ | |
$IMAGE_NAME | |
- name: Screen Width 3840x2160 Test | |
run: | | |
podman run --shm-size=1g \ | |
-v `pwd`/test/browser-library.robot:/opt/robotframework/tests/browser-library.robot:Z \ | |
-v `pwd`/test/selenium.robot:/opt/robotframework/tests/selenium.robot:Z \ | |
-e BROWSER=$BROWSER \ | |
-e SCREEN_WIDTH=3840 \ | |
-e SCREEN_HEIGHT=2160 \ | |
$IMAGE_NAME | |
- name: Debug Log Level Test | |
run: | | |
podman run --shm-size=1g \ | |
-v `pwd`/test/faker.robot:/opt/robotframework/tests/faker.robot:Z \ | |
-e BROWSER=$BROWSER \ | |
-e ROBOT_OPTIONS="--loglevel DEBUG" \ | |
$IMAGE_NAME | |
- name: Basic Multithreaded Test | |
run: | | |
podman run --shm-size=1g \ | |
-v `pwd`/test/browser-library.robot:/opt/robotframework/tests/browser-library.robot:Z \ | |
-v `pwd`/test/faker.robot:/opt/robotframework/tests/faker.robot:Z \ | |
-v `pwd`/test/requests.robot:/opt/robotframework/tests/requests.robot:Z \ | |
-v `pwd`/test/selenium.robot:/opt/robotframework/tests/selenium.robot:Z \ | |
-v `pwd`/test/timezones.robot:/opt/robotframework/tests/timezones.robot:Z \ | |
-e BROWSER=$BROWSER \ | |
-e ROBOT_THREADS=4 \ | |
$IMAGE_NAME | |
- name: Test Level Multithreaded Test | |
run: | | |
podman run --shm-size=1g \ | |
-v `pwd`/test/browser-library.robot:/opt/robotframework/tests/browser-library.robot:Z \ | |
-v `pwd`/test/faker.robot:/opt/robotframework/tests/faker.robot:Z \ | |
-v `pwd`/test/requests.robot:/opt/robotframework/tests/requests.robot:Z \ | |
-v `pwd`/test/selenium.robot:/opt/robotframework/tests/selenium.robot:Z \ | |
-v `pwd`/test/timezones.robot:/opt/robotframework/tests/timezones.robot:Z \ | |
-e BROWSER=$BROWSER \ | |
-e ROBOT_THREADS=4 \ | |
-e PABOT_OPTIONS="--testlevelsplit" \ | |
$IMAGE_NAME | |
- name: Custom User Test | |
run: | | |
podman run --user=2000 --shm-size=1g \ | |
-v `pwd`/test/faker.robot:/opt/robotframework/tests/faker.robot:Z \ | |
-e BROWSER=$BROWSER \ | |
$IMAGE_NAME | |
- name: Custom User and Group Test | |
run: | | |
podman run --user=2000:2000 --shm-size=1g \ | |
-v `pwd`/test/faker.robot:/opt/robotframework/tests/faker.robot:Z \ | |
-e BROWSER=$BROWSER \ | |
$IMAGE_NAME | |
- name: Datetime | |
run: | | |
podman run --user=2000:2000 --shm-size=1g \ | |
-v `pwd`/test/timezones.robot:/opt/robotframework/tests/timezones.robot:Z \ | |
-e BROWSER=$BROWSER \ | |
-e TZ="America/New_York" \ | |
$IMAGE_NAME |