Create documentation.yaml #61
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: Run Robot Framework Tests | |
# This workflow gets triggered on pushes and pull requests to the master branch. | |
# Tests are not run at changes on the README file. | |
on: | |
push: | |
branches: | |
- master | |
paths-ignore: | |
- 'README.md' | |
pull_request: | |
paths-ignore: | |
- 'README.md' | |
jobs: | |
run_tests: | |
runs-on: ubuntu-latest | |
steps: | |
# checkout code from the repository | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
# Sets up the specified Python version | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
cache: 'pip' | |
# Add LEDSA to PYTHONPATH | |
- name: Install LEDSA package and dependencies | |
run: pip install . | |
# create folder for test reports | |
- name: Create folder for reports | |
run: mkdir reports | |
# run Robot Framework tests | |
- name: Run Robot Framework Tests | |
run: | | |
robot \ | |
--outputdir reports \ | |
ledsa/tests/AcceptanceTests | |
# If the tests fail, this step ensures the logs are uploaded for inspection | |
- name: Upload Robot Framework logs | |
# This condition ensures the step runs regardless of the test outcome | |
if: always() | |
uses: actions/upload-artifact@v2 | |
with: | |
name: robot-framework-logs | |
path: results/ |