Copyright (c) 2024 Antmicro
A GitHub Action for testing embedded software in the Renode simulation environment using the Robot Framework.
See how to use Robot with Renode in the relevant chapter in our documentation.
This action allows you to write a test in Robot using Renode's predefined keyword library and execute them automatically in GitHub Actions, which results in very nice test logs and summaries.
See action.yml
steps:
- uses: antmicro/[email protected]
with:
renode-version: 'latest'
tests-to-run: 'tests/**/*.robot'
If you use this action many times in a single job, Renode gets downloaded only once.
However, if you want to use the same Renode instance across multiple jobs, it's advisable to use cache.
jobs:
first-job:
steps:
- name: Prepare Renode settings
run: |
echo "RENODE_VERSION=latest" >> $GITHUB_ENV
echo "RENODE_RUN_DIR=/some/directory" >> $GITHUB_ENV
- name: Download Renode
uses: antmicro/[email protected]
with:
renode-version: '${{ env.RENODE_VERSION }}'
renode-run-path: '${{ env.RENODE_RUN_DIR }}'
- name: Cache Renode installation
uses: actions/cache@v2
id: cache-renode
with:
path: '${{ env.RENODE_RUN_DIR }}'
key: cache-renode-${{ env.RENODE_VERSION }}
second-job:
steps:
- name: Prepare Renode settings
run: |
echo "RENODE_VERSION=latest" >> $GITHUB_ENV
echo "RENODE_RUN_DIR=/some/directory" >> $GITHUB_ENV
- name: Restore Renode
uses: actions/cache@v2
id: cache-renode
with:
path: '${{ env.RENODE_RUN_DIR }}'
key: cfu-cache-renode-${{ env.RENODE_VERSION }}
- name: Run tests
uses: antmicro/[email protected]
with:
renode-version: '${{ env.RENODE_VERSION }}'
tests-to-run: tests-*.robot
renode-run-path: '${{ env.RENODE_RUN_DIR }}'