Skip to content

GitHub Action allowing to run tests in the Renode framework

License

Notifications You must be signed in to change notification settings

UCR-FSAE/renode-test-action

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Test in Renode GitHub Action

Copyright (c) 2024 Antmicro

View on Antmicro Open Source Portal

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.

Usage

Test action

See action.yml

steps:
- uses: antmicro/[email protected]
  with:
    renode-version: 'latest'
    tests-to-run: 'tests/**/*.robot'

Using cache

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 }}'

About

GitHub Action allowing to run tests in the Renode framework

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 81.3%
  • RobotFramework 18.7%