mirror of
https://github.com/MobSF/Mobile-Security-Framework-MobSF.git
synced 2026-10-11 22:50:09 +00:00
59 lines
2.0 KiB
YAML
59 lines
2.0 KiB
YAML
name: MobSF tests
|
|
|
|
on:
|
|
push:
|
|
branches: [ master ]
|
|
pull_request:
|
|
branches: [ master ]
|
|
|
|
jobs:
|
|
build:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [ubuntu-20.04, macos-latest, windows-latest]
|
|
python-version: [3.7, 3.8]
|
|
exclude:
|
|
# excludes py38 on Windows
|
|
- os: windows-latest
|
|
python-version: 3.8
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Set up Python ${{ matrix.python-version }}
|
|
uses: actions/setup-python@v1
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
- name: Install Ubuntu Dependencies
|
|
if: startsWith(matrix.os, 'ubuntu')
|
|
run: |
|
|
sudo apt update && sudo apt install -y xfonts-75dpi xfonts-base
|
|
export WKHTML_URL=https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/
|
|
export WKHTML_DEB=wkhtmltox_0.12.6-1.focal_amd64.deb
|
|
wget ${WKHTML_URL}${WKHTML_DEB} && sudo dpkg -i ${WKHTML_DEB} && rm -rf ${WKHTML_DEB}
|
|
- name: Install macOS Dependencies
|
|
if: startsWith(matrix.os, 'macOS')
|
|
run: |
|
|
brew install --cask wkhtmltopdf
|
|
- name: Install Windows Dependencies
|
|
if: startsWith(matrix.os, 'windows')
|
|
run: |
|
|
choco install wkhtmltopdf --version 0.12.6
|
|
- name: Install Python dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip wheel tox
|
|
pip install --no-index --find-links=scripts/wheels yara-python || (pip wheel --wheel-dir=yara-python --build-option="build" --build-option="--enable-dex" "git+https://github.com/VirusTotal/[email protected]" && pip install --no-index --find-links=yara-python yara-python)
|
|
pip install -r requirements.txt
|
|
- name: Migrate Database
|
|
run: |
|
|
python manage.py makemigrations
|
|
python manage.py makemigrations StaticAnalyzer
|
|
python manage.py migrate
|
|
- name: Lint
|
|
run: |
|
|
tox -e lint
|
|
- name: Unit Tests
|
|
run: |
|
|
git submodule update --init --recursive
|
|
python manage.py test mobsf
|