Leverage terser to mangle/compress the generated js messages (#1086) #374
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: rclnodejs - Linux Build and Test | |
| on: | |
| push: | |
| branches: | |
| - develop | |
| - jazzy | |
| - humble-hawksbill | |
| pull_request: | |
| branches: | |
| - develop | |
| - jazzy | |
| - humble-hawksbill | |
| workflow_dispatch: | |
| defaults: | |
| run: | |
| shell: bash | |
| jobs: | |
| identify-ros-distro: | |
| uses: ./.github/workflows/identify-ros-distro.yml | |
| build: | |
| needs: identify-ros-distro | |
| runs-on: ${{ needs.identify-ros-distro.outputs.linuxos }} | |
| container: | |
| image: osrf/ros:${{ needs.identify-ros-distro.outputs.distro }}-desktop | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| node-version: [20.X, 22.X, 23.X] | |
| steps: | |
| - name: Setup Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - name: Setup ROS2 | |
| uses: ros-tooling/[email protected] | |
| - name: Install test-msgs on Linux | |
| run: | | |
| sudo apt install ros-${{ needs.identify-ros-distro.outputs.distro }}-test-msgs | |
| - uses: actions/checkout@v4 | |
| - name: Build and test rclnodejs | |
| run: | | |
| source /opt/ros/${{ needs.identify-ros-distro.outputs.distro }}/setup.bash | |
| npm i | |
| npm run lint | |
| npm test | |
| npm run clean | |
| - name: Coveralls Parallel | |
| uses: coverallsapp/github-action@v2 | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| flag-name: run-${{ matrix.node-version}} | |
| parallel: true | |
| finish: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Coveralls Finished | |
| uses: coverallsapp/github-action@v2 | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| parallel-finished: true |