-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add GH actions for Robot Framework tests
Borrowed code from https://piyathida-sanaoun01.medium.com/how-to-setup-ci-github-action-to-run-robot-framework-49028a404fee
- Loading branch information
Showing
4 changed files
with
91 additions
and
4 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: Robot Framework CI | ||
|
||
# Borrowed code from: | ||
# https://piyathida-sanaoun01.medium.com/how-to-setup-ci-github-action-to-run-robot-framework-49028a404fee | ||
# https://github.com/laojala/robot_docker_demo/blob/master/.github/workflows/run_robot_framework_tests.yml | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
# Do not run tests if file README.md changes | ||
paths-ignore: | ||
- '**.md' | ||
pull_request: | ||
# Do not run tests if file README.md changes | ||
paths-ignore: | ||
- '**.md' | ||
schedule: | ||
# Run tests nightly at 2am | ||
- cron: '0 2 * * *' | ||
jobs: | ||
Run-Test: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- uses: actions/cache@v4 | ||
id: cache | ||
with: | ||
path: ~/.cache/pip | ||
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements*.txt') }} | ||
- name: Install pip dependencies | ||
run: | | ||
pip install --upgrade pip certifi urllib3 | ||
pip install -r requirements.txt -r requirements-test.txt | ||
- name: Run Robot tests | ||
run: ADDITIONAL_ROBOT_ARGS="--variable=additional_chrome_options:--headless" ./run-robot-tests | ||
- name: Publish test results | ||
if: always() | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: robot-test-results | ||
path: tests/robot/output/ |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
#!/bin/sh | ||
|
||
robot --outputdir=tests/robot/output --variable=app_url:http://localhost:8501 tests/robot/ | ||
robot \ | ||
--outputdir=tests/robot/output \ | ||
--variable=app_url:http://localhost:8501 \ | ||
${ADDITIONAL_ROBOT_ARGS} \ | ||
tests/robot/ |
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
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