From 1f9a18050218c8197c1e8b81a667d250a84f8f2a Mon Sep 17 00:00:00 2001 From: Muzzammil Shahid <63513030+muzzammilshahid@users.noreply.github.com> Date: Sat, 16 Oct 2021 01:12:46 +0500 Subject: [PATCH] Replace Travis with GitHub Actions (#530) * add github workflows * delete travis.yml * minor cleaning in CI config --- .github/workflows/main.yml | 34 ++++++++++++++++++++++++++++++++++ .travis.yml | 34 ---------------------------------- 2 files changed, 34 insertions(+), 34 deletions(-) create mode 100644 .github/workflows/main.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 00000000..b0700a45 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,34 @@ +name: main + +on: + push: + branches: + - master + pull_request: + branches: + - master + +jobs: + check: + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v2 + + - name: Set up JDK 1.8 + uses: actions/setup-java@v1 + with: + java-version: 1.8 + + - name: Setup Android SDK + uses: android-actions/setup-android@v2 + + - name: Build android library + run: ./gradlew :autobahn:build connectedCheck + + - name: Setup Crossbar + run: | + docker run -d -p 8080:8080 --name crossbar crossbario/crossbar + docker run -d --link crossbar -v ${PWD}/demo-gallery/python:/test crossbario/autobahn-python python -u /test/test_component2.py + + - name: Run tests + run: docker run --rm -i --link crossbar -v ${PWD}/workspace crossbario/autobahn-java:netty /bin/bash -c "gradle installDist -PbuildPlatform=netty && /workspace/demo-gallery/build/install/demo-gallery/bin/demo-gallery ws://crossbar:8080/ws" diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 2081753d..00000000 --- a/.travis.yml +++ /dev/null @@ -1,34 +0,0 @@ -matrix: - include: - - language: android - android: - components: - - tools - - platform-tools - - tools - - build-tools-29.0.3 - - android-29 - licenses: - - 'android-sdk-preview-license-.+' - - 'android-sdk-license-.+' - - 'google-gdk-license-.+' - script: - - ./gradlew :autobahn:build connectedCheck - - language: minimal - services: - - docker - install: - - if [[ $(git diff --name-only $TRAVIS_COMMIT_RANGE) =~ "docker/Dockerfile.netty" ]]; then docker build -t crossbario/autobahn-java:netty -f ./docker/Dockerfile.netty .; fi - before_script: - - docker run -d -p 8080:8080 --name crossbar crossbario/crossbar - - docker run -d --link crossbar -v ${PWD}/demo-gallery/python:/test crossbario/autobahn-python python -u /test/test_component2.py - script: - - docker run --rm -it --link crossbar -v ${PWD}:/workspace crossbario/autobahn-java:netty /bin/bash -c "gradle installDist -PbuildPlatform=netty && /workspace/demo-gallery/build/install/demo-gallery/bin/demo-gallery ws://crossbar:8080/ws" - -deploy: - provider: releases - file: autobahn/build/outputs/aar/autobahn-android-release.aar - skip_cleanup: true - on: - tags: true - api_key: "$GITHUB_OAUTH_TOKEN"