Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Validate Templates (#2387) #2990

Merged
merged 11 commits into from
Dec 5, 2024
5 changes: 5 additions & 0 deletions .github/workflows/bootstrap.exp
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
set timeout 120
spawn fprime-bootstrap project
expect "Project name (MyProject):"
send -- "MyProject\r"
expect eof
15 changes: 15 additions & 0 deletions .github/workflows/component.exp
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
set timeout 120
spawn fprime-util new --component
expect "Component name (MyComponent):"
send -- "MyComponent\r"
expect "Select component kind"
send -- "1\r"
expect "Enable Commands?"
send -- "1\r"
expect "Enable Telemetry?"
send -- "1\r"
expect "Enable Parameters?"
send -- "1\r"
expect "Add MyComponent to"
send -- "yes\r"
expect eof
9 changes: 9 additions & 0 deletions .github/workflows/deployment.exp
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
set timeout 120
spawn fprime-util new --deployment
expect "Deployment name (MyDeployment):"
send -- "MyDeployment\r"
expect "Select communication driver type"
send -- "2\r"
expect "Add MyDeployment to fprime/CMakeLists.txt"
send -- "yes\r"
expect eof
44 changes: 44 additions & 0 deletions .github/workflows/validate_templates.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: validate_templates-actions
run-name: ${{ github.actor }} running Validate Templates CI actions
on: [push]
thomas-bc marked this conversation as resolved.
Show resolved Hide resolved


jobs:

validate_templates:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: "Checkout F' Repository"
uses: actions/checkout@v4
with:
submodules: true
path: ${{ inputs.fprime_location }}

- name: "Test bootstrap"
run: |
pip install fprime-bootstrap
sudo apt-get install expect
mkdir test_dev
cd test_dev
expect ../.github/workflows/bootstrap.exp
LeStarch marked this conversation as resolved.
Show resolved Hide resolved

- name: "Activate Venv and Generate"
run: |
cd test_dev/MyProject
. fprime-venv/bin/activate
fprime-util generate

- name: "Test Deployment and build"
run: |
cd test_dev/MyProject
. fprime-venv/bin/activate
expect ../../.github/workflows/deployment.exp
fprime-util build
LeStarch marked this conversation as resolved.
Show resolved Hide resolved

- name: "Test Component and build"
run: |
cd test_dev/MyProject
. fprime-venv/bin/activate
expect ../../.github/workflows/component.exp
fprime-util build
LeStarch marked this conversation as resolved.
Show resolved Hide resolved
Loading