blob: 7fb36998e02a6d49f569024c61abf02051a1eeb1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
#!/bin/bash
echo "Checking package"
mypy --strict --namespace-packages --ignore-missing-imports --cache-dir=/tmp/ src/soc_collector/*.py || exit 1
black --line-length 120 src/soc_collector/*.py # || exit 1
pylint --max-line-length 120 src/soc_collector/*.py # || exit 1
echo "Checking tests"
mypy --strict --namespace-packages --ignore-missing-imports --cache-dir=/tmp/ tests/*.py # || exit 1
black --line-length 120 tests/*.py # || exit 1
pylint --disable R0801 --max-line-length 120 tests/*.py # || exit 1
# Stop the containers
docker-compose down --remove-orphans
# Set data ownership
mkdir -p data/mongodb_data
sudo chown -R "$USER" data/mongodb_data
# Build containers
docker-compose -f docker-compose.yml build
# Set data ownership
sudo chown -R 101 data/mongodb_data
# Run and deploy containers
docker-compose -f docker-compose.yml up -d
sleep 3
echo "Running tests"
python3 -m unittest
|