Skip to content

Manage DEBUG logs more intelligently. Possibility to discart to impro… #1764

Manage DEBUG logs more intelligently. Possibility to discart to impro…

Manage DEBUG logs more intelligently. Possibility to discart to impro… #1764

Workflow file for this run

name: CI/CD Status
on: [push,pull_request]
jobs:
build:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.16
- name: Gosec - Code Analyser
continue-on-error: true
run: |
curl -sfL https://raw.githubusercontent.com/securego/gosec/master/install.sh | sh -s -- -b $(go env GOPATH)/bin latest
gosec ./...
- name: Docker Build Job
run: |
export GOBIN=/home/runner/go/bin
docker --version
echo "build discovery"
cd discovery
pwd
sh build development
echo "build broker"
cd ../broker
pwd
sh build development
echo "build worker"
cd ../worker
pwd
sh build development
echo "build master"
cd ../master
pwd
sh build development
echo "build designer"
cd ../designer
pwd
sh build development
- name: Setting Up Environment
run: |
sudo apt-get install jq
sudo apt install python3.7
sudo apt install python-pip
pip -V
sudo pip install --upgrade pip
pip install setuptools
pip install Flask
pip install requests
pip install -U pytest
pip install pytest-cov
pip install pyflakes
sudo npm install -g eslint
sudo apt-get install curl
- name: Running Linters [GoLint - a linter for golang, Pyflakes - a linter for python, ESLint - for Javascript]
run: |
#For go directories
go get -u golang.org/x/lint/golint
export GOBIN=/home/runner/go/bin
cd discovery/
golint
cd ../broker
golint
cd ../master
golint
cd ../worker
golint
cd ../
echo "For python files"
pyflakes . || true
echo "For Javascript files"
eslint . --no-eslintrc --format table || true
- name: Launching Docker containers
run: |
sudo docker run -it -d --rm --name rabbitmq -p 5672:5672 -p 15672:15672 --env RABBITMQ_DEFAULT_USER=admin --env RABBITMQ_DEFAULT_PASS=mypass rabbitmq:3.8-management
docker ps -a
- name: Building Fogflow Components
run: |
export GOBIN=/home/runner/go/bin
ls
cd discovery/
go get; go build;
ls
cd ../broker/
go get; go build;
ls
cd ../designer/
npm install
- name: Running Test Cases
run: |
export PATH=/home/runner/.local/bin:$PATH
ls
cp release/validation/config.json discovery/
cp release/validation/config.json broker/
cp release/validation/config.json master/
cp release/validation/config.json worker/
cp release/validation/config.json designer/
cd discovery/
screen -d -m ./discovery
cd ../broker/
screen -d -m ./broker
cd ../designer/
screen -d -m node main.js
cd ../test/UnitTest/
screen -d -m python accumulator.py
# echo "NGSI-v1 Testing !!!"
# cd ../UnitTest/v1/
# pytest -s -v test_casesNGSIv1.py
# echo "NGSI-v2 Testing !!!"
# cd ../v2/
# pytest -s -v test_casesNGSIv2.py
# echo "NGSI-LD Testing !!!"
# cd ../NGSI-LD/
# pytest -s -v test_casesNGSI-LD.py
# echo "Persistance Testing !!!"
# cd ../persistance/
# pytest -s -v test_persistance.py
echo "Testing Done !!!!!"