diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 12b5197..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,26 +0,0 @@ -version: 2.1 -jobs: - build: - docker: - - image: ../.tests/DockerfileUbuntu - steps: - - run: - name: Setup - command: | - redis-server & - cd /tmp/hyperglass - poetry run hyperglass setup -d - poetry run hyperglass build-ui - - run: - name: Set listen_address - command: | - echo "listen_address: 127.0.0.1" >> /root/hyperglass/hyperglass.yaml - - run: - name: Start - command: | - poetry run hyperglass start &> /var/log/hyperglassci.log & - sleep 10 - - run: - name: Test - command: | - curl -s -o /dev/null -w "%{http_code}" http://localhost:8001 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 1dc65fe..a358775 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,29 +1,29 @@ -name: Run Tests -on: - push: - branches: - - v1.0.0 +# name: Run Tests +# on: +# push: +# branches: +# - v1.0.0 -jobs: - build: - runs-on: ubuntu-18.04 - services: - redis: - image: redis - ports: - - 6379:6379 - steps: - - name: Setup Python 3.6 - uses: actions/setup-python@v1 - with: - python-version: 3.6.10 - - name: Clone Repository - uses: actions/checkout@v2 - with: - ref: v1.0.0 - - name: Install Poetry - uses: dschep/install-poetry-action@v1.3 - - name: Install Python Dependencies - run: poetry install - - name: Lint - run: poetry run flake8 hyperglass +# jobs: +# build: +# runs-on: ubuntu-18.04 +# services: +# redis: +# image: redis +# ports: +# - 6379:6379 +# steps: +# - name: Setup Python 3.6 +# uses: actions/setup-python@v1 +# with: +# python-version: 3.6.10 +# - name: Clone Repository +# uses: actions/checkout@v2 +# with: +# ref: v1.0.0 +# - name: Install Poetry +# uses: dschep/install-poetry-action@v1.3 +# - name: Install Python Dependencies +# run: poetry install +# - name: Lint +# run: poetry run flake8 hyperglass diff --git a/.tests/DockerfileUbuntu b/.tests/DockerfileUbuntu index e2becba..458c36d 100644 --- a/.tests/DockerfileUbuntu +++ b/.tests/DockerfileUbuntu @@ -22,4 +22,3 @@ FROM base as install WORKDIR /tmp/hyperglass RUN poetry install --no-ansi COPY ./dockersetup.sh /dockersetup.sh -ENTRYPOINT ["/dockersetup.sh"] diff --git a/.tests/dockersetup.sh b/.tests/dockersetup.sh new file mode 100755 index 0000000..15d3ec1 --- /dev/null +++ b/.tests/dockersetup.sh @@ -0,0 +1,13 @@ +#!/bin/sh -l +cd /tmp/hyperglass +echo "Starting setup..." +poetry run hyperglass setup -d +echo "Setup completed" +sleep 2 +echo "Starting UI build" +poetry run hyperglass build-ui +echo "UI build completed" +# echo "Starting redis..." +# redis-server & +# echo "Redis started" +echo "" diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..0365cb3 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,10 @@ +--- +language: minimal +services: + - docker + - redis +before_install: + - docker build -t hyperglass/ubuntu -f ./tests/DockerfileUbuntu . + +script: + - bash /tmp/dockersetup.sh