diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml new file mode 100644 index 0000000000..5f41dcd6dd --- /dev/null +++ b/.github/workflows/run-tests.yml @@ -0,0 +1,33 @@ +name: Build and run tests + +on: + push: + branches: [ master, develop ] + pull_request: + branches: [ master, develop ] + workflow_dispatch: + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '3.8' + - name: Clone ns-3 + run: git clone https://gitlab.com/nsnam/ns-3-dev + - uses: actions/checkout@v2 + with: + path: 'ns-3-dev/src/lorawan' + - name: Compile and run tests + run: | + cd ns-3-dev/ + cp utils/.ns3rc ./ + sed -i "s/all_modules/lorawan/" .ns3rc + sed -i "s/False/True/" .ns3rc + ./ns3 configure + ./ns3 build + ./test.py -n -s lorawan