This is a Code Nummy about Github Actions. Please check out the other Code Nummies.
Please find some short presentation here. You will need to fork this repository to your own github account.
- create the file
.github/workflows/main.yml
name: Validate
on:
push:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
After you push that file (with at least one step added to the jobs), github will automatically start to process the specified workflow.
Note: For every step in the job you can specify the working directory via
working-directory: ${{github.workspace}}/python
. This will be required for github actions to work in the correct folder (e.g. in a build
-subfolder).
- Set up the correct python version. Assume that python 3.9 is required. Hint
- Use the checkout action to get a copy of the repository
- Install the dependencies with pip by executing
pip install -r requirements.txt
- Execut the tests via
python -m pytest
- Install the correct cmake version (it is required to use 3.21) using actions-setup-cmake
- Install the correct g++ version (it is required to use g++ 9) using install-gcc
- Use the checkout action to get a copy of the repository
- call cmake
- execute the test