Avoid calls to bdclose if Simulink is not installed. #64
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 all toolbox tests | |
| on: | |
| # Automatically run this action when a new push is made to repo | |
| push: | |
| # Run tests every 6 months after prerelease comes out to check for regressions. | |
| # Prerelease for "a" release is out by Jan 1. for "b" release by Jul 1 | |
| schedule: | |
| - cron: "0 0 1 1,7 *" | |
| # Allows you to run this workflow manually from the Actions tab | |
| workflow_dispatch: | |
| jobs: | |
| unittest: | |
| name: Run RVC3-MATLAB unit tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out RVC3-MATLAB repository (for unit tests) | |
| uses: actions/checkout@v4 | |
| - run: echo "The ${{ github.repository }} repository has been cloned to the runner." | |
| - name: Set up MATLAB | |
| # This uses the latest release of MATLAB. Can specify "release" if needed. | |
| uses: matlab-actions/setup-matlab@v2 | |
| with: | |
| products: MATLAB Simulink Robotics_System_Toolbox Navigation_Toolbox UAV_Toolbox Automated_Driving_Toolbox Computer_Vision_Toolbox Image_Processing_Toolbox Deep_Learning_Toolbox Model_Predictive_Control_Toolbox Optimization_Toolbox ROS_Toolbox Signal_Processing_Toolbox Statistics_and_Machine_Learning_Toolbox Symbolic_Math_Toolbox Control_System_Toolbox | |
| # Run tests with prerelease as soon as available; switch to GR once it's live | |
| release: latest-including-prerelease | |
| - name: Print out ver details | |
| uses: matlab-actions/run-command@v1 | |
| with: | |
| command: ver | |
| - name: Run MATLAB Tests | |
| # Only run tests in test/toolbox folder | |
| uses: matlab-actions/run-tests@v2 | |
| with: | |
| source-folder: toolbox; toolbox/internal; test/tools | |
| select-by-folder: test/toolbox | |
| test-results-junit: test-results/unit_tests.xml | |
| code-coverage-cobertura: code-coverage/unit_tests_coverage.xml | |
| - name: show all files | |
| run: ls -R | |
| - name: Upload coverage reports to Codecov | |
| uses: codecov/codecov-action@v3 | |
| env: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
| with: | |
| file: code-coverage/unit_tests_coverage.xml | |
| - name: Upload logs and coverage for RVC3 unit tests | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: book-${{ matrix.chapter }} | |
| path: | | |
| test-results/unit_tests.xml | |
| code-coverage/unit_tests_coverage.xml | |
| # codecov: | |
| # # If all tests pass: | |
| # # Run coverage and upload to codecov | |
| # needs: unittest | |
| # runs-on: ubuntu-latest | |
| # steps: | |
| # - name: Upload coverage reports to Codecov | |
| # uses: codecov/codecov-action@v3 | |
| # env: | |
| # CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
| # with: | |
| # file: ./coverage.xml |