diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..a9d32ef --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,18 @@ +name: CI + +on: + push: + branches: [ advanced ] + pull_request: + branches: [ advanced ] + workflow_dispatch: + +jobs: + verify_solution: + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v2 + - name: Download deps + run: make deps + - name: Check solution + run: make check check-sr check-gtp NGSDN_TUTORIAL_SUDO=sudo diff --git a/util/mn-cmd b/util/mn-cmd index 346f201..9af5c0b 100755 --- a/util/mn-cmd +++ b/util/mn-cmd @@ -5,4 +5,7 @@ if [ -z $1 ]; then exit 1 fi -docker exec -it mininet /mininet/host-cmd $@ +# Do not attach stdin if running in an environment without (e.g., GitHub Actions) +it=$(test -t 0 && echo "-it" || echo "-t") + +docker exec $it mininet /mininet/host-cmd $@