name: Integration tests
on: [push, pull_request]

jobs:
  format_check:
    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v2
    - uses: 'ros-industrial/industrial_ci@master'
      env:
        ROS_DISTRO: melodic
        CLANG_FORMAT_CHECK: file
        CLANG_FORMAT_VERSION: "9"

  build:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        env:
          - DOCKER_RUN_OPTS: --network static_test_net
            BEFORE_INIT: 'apt-get update -qq && apt-get install -y iproute2 iputils-ping && ip addr && ping -c5 192.168.56.101'

    steps:
      - uses: actions/checkout@v1
      - name: start ursim
        run: |
          tests/resources/dockerursim/build_and_run_docker_ursim.sh
      - name: install gtest
        run: sudo apt-get install -y libgtest-dev
      - name: configure
        run: mkdir build && cd build && cmake .. -DBoost_INCLUDE_DIR=$BOOST_ROOT_1_72_0/include -DBUILDING_TESTS=1
      - name: build
        run: cmake --build build --config Debug
      - name: test
        run: cd build && make test

Build and run tests on GH action
Build and run tests on GH action
