Skip to content

Upgrade Rekono version to 1.6.5 #503

Upgrade Rekono version to 1.6.5

Upgrade Rekono version to 1.6.5 #503

Workflow file for this run

name: Unit tests
on:
workflow_dispatch:
pull_request:
paths:
- 'rekono/**'
- '!rekono/frontend/**'
- 'requirements.txt'
env:
REQUIRED_COVERAGE: 95
jobs:
unit-tests:
name: Unit tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install and start Redis server
run: |
sudo apt update -y
sudo apt install redis-server -y
sudo systemctl start redis-server
- name: Install Nmap to check its installation
run: sudo apt install nmap -y
- name: Install Dirsearch to check its installation
run: |
git clone https://github.com/maurosoria/dirsearch.git
ln -s dirsearch/dirsearch.py /usr/local/bin/dirsearch
- name: Install GitLeaks to check its installation
run: |
wget https://github.com/zricethezav/gitleaks/releases/download/v8.5.1/gitleaks_8.5.1_linux_x64.tar.gz
tar -xvf gitleaks_8.5.1_linux_x64.tar.gz
chmod +x gitleaks
mv gitleaks /usr/local/bin/
- uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Install Python dependencies
run: python3 -m pip install -r requirements.txt
- name: Run unit tests
working-directory: rekono
run: coverage run manage.py test
- name: Check coverage
working-directory: rekono
run: coverage report -m --skip-covered --omit="telegram_bot/*" --fail-under=$REQUIRED_COVERAGE