Added more comments. Added test function to check rep consistentcy #38
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Run MATLAB Tests | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| run-matlab-tests: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up MATLAB | |
| uses: matlab-actions/setup-matlab@v1 | |
| - name: Run MATLAB Test Script | |
| uses: matlab-actions/run-command@v1 | |
| with: | |
| command: | | |
| try | |
| global testing_yml_workflow; | |
| testing_yml_workflow = true; % Indicate CI/CD mode | |
| % Run the test script | |
| power_calculator_test_script; | |
| disp('All tests passed successfully.'); | |
| catch ME | |
| disp('Test failed.'); | |
| disp(ME.message); | |
| exit(1); | |
| end |