diff --git a/.github/workflows/bootstrap.exp b/.github/workflows/bootstrap.exp new file mode 100644 index 0000000000..a7c6d16cba --- /dev/null +++ b/.github/workflows/bootstrap.exp @@ -0,0 +1,5 @@ +set timeout 180 +spawn fprime-bootstrap project +expect "Project name (MyProject):" +send "MyProject\r" +expect eof diff --git a/.github/workflows/component.exp b/.github/workflows/component.exp new file mode 100644 index 0000000000..23271780a9 --- /dev/null +++ b/.github/workflows/component.exp @@ -0,0 +1,24 @@ +set timeout 60 +spawn fprime-util new --component +expect -re {.*Component name.*} +send "MyComponent\r" +expect -re {.*Component short description.*} +send "test component\r" +expect -re {.*Component namespace.*} +send "Components\r" +expect -re {.*Select component kind} +send "1\r" +expect -re {.*Enable Commands.*} +send "1\r" +expect -re {.*Enable Telemetry.*} +send "1\r" +expect -re {.*Enable Events.*} +send "1\r" +expect -re {.*Enable Parameters.*} +send "1\r" +expect -re {Add MyComponent to.*} +send "yes\r" +expect -re {Generate implementation files.*} +send "yes\r" +expect -re {.*Created new component.*} +expect eof diff --git a/.github/workflows/deployment.exp b/.github/workflows/deployment.exp new file mode 100644 index 0000000000..75924082e9 --- /dev/null +++ b/.github/workflows/deployment.exp @@ -0,0 +1,9 @@ +set timeout 60 +spawn fprime-util new --deployment +expect -re {Deployment name.*} +send "MyDeployment\r" +expect -re {.*Select communication driver type} +send "1\r" +expect -re "Add MyDeployment.*" +send "yes\r" +expect eof diff --git a/.github/workflows/validate_templates.yml b/.github/workflows/validate_templates.yml new file mode 100644 index 0000000000..5dffa04fea --- /dev/null +++ b/.github/workflows/validate_templates.yml @@ -0,0 +1,54 @@ +name: validate_templates-actions +run-name: ${{ github.actor }} running Validate Templates CI actions +on: [push] +# push: +# branches: [ devel, release/** ] +# pull_request: +# # The branches below must be a subset of the branches above +# branches: [ devel, release/** ] +# paths-ignore: +# - 'docs/**' +# - '**.md' +# - '.github/actions/spelling/**' +# - '.github/ISSUE_TEMPLATE/**' + +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 and build" + run: | + pip install git+https://github.com/nasa/fprime-tools@devel + pip install git+https://github.com/fprime-community/fprime-bootstrap@devel + sudo apt-get install expect + mkdir test_dev + cd test_dev + expect ../.github/workflows/bootstrap.exp + cd MyProject + . fprime-venv/bin/activate + fprime-util generate + fprime-util build + + - name: "Test Deployment and build" + run: | + cd test_dev/MyProject + . fprime-venv/bin/activate + expect ../../.github/workflows/deployment.exp + cd MyDeployment + fprime-util build + + - name: "Test Component and build" + run: | + cd test_dev/MyProject + . fprime-venv/bin/activate + expect ../../.github/workflows/component.exp + cd MyComponent + fprime-util build