mirror of
https://github.com/checktheroads/hyperglass
synced 2024-05-11 05:55:08 +00:00
test travis
This commit is contained in:
@@ -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
|
56
.github/workflows/tests.yml
vendored
56
.github/workflows/tests.yml
vendored
@@ -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
|
||||
|
@@ -22,4 +22,3 @@ FROM base as install
|
||||
WORKDIR /tmp/hyperglass
|
||||
RUN poetry install --no-ansi
|
||||
COPY ./dockersetup.sh /dockersetup.sh
|
||||
ENTRYPOINT ["/dockersetup.sh"]
|
||||
|
13
.tests/dockersetup.sh
Executable file
13
.tests/dockersetup.sh
Executable file
@@ -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 ""
|
10
.travis.yml
Normal file
10
.travis.yml
Normal file
@@ -0,0 +1,10 @@
|
||||
---
|
||||
language: minimal
|
||||
services:
|
||||
- docker
|
||||
- redis
|
||||
before_install:
|
||||
- docker build -t hyperglass/ubuntu -f ./tests/DockerfileUbuntu .
|
||||
|
||||
script:
|
||||
- bash /tmp/dockersetup.sh
|
Reference in New Issue
Block a user