mirror of
https://github.com/MobSF/Mobile-Security-Framework-MobSF.git
synced 2026-10-11 22:50:09 +00:00
* Python Support updated to 3.12-3.13 * Bump mitmproxy * Bump httptools * Remove pinned xmlsec, lxml * Android Permission Update * Updates Signatures
87 lines
2.7 KiB
YAML
87 lines
2.7 KiB
YAML
name: MobSF tests
|
|
|
|
on:
|
|
push:
|
|
branches: [ master ]
|
|
pull_request:
|
|
branches: [ master ]
|
|
|
|
env:
|
|
MOBSF_DISABLE_AUTHENTICATION: "1"
|
|
|
|
jobs:
|
|
build:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [ubuntu-22.04, macos-latest, windows-latest]
|
|
python-version: ['3.12', '3.13']
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Set up Python ${{ matrix.python-version }}
|
|
uses: actions/setup-python@v3
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
|
|
- name: Setup pip, poetry and tox
|
|
run: |
|
|
python -m ensurepip --upgrade
|
|
python -m pip install pip poetry==1.8.4
|
|
python -m pip install --upgrade setuptools tox
|
|
|
|
- name: Lint on Ubuntu
|
|
if: startsWith(matrix.os, 'ubuntu')
|
|
run: |
|
|
tox -e lint
|
|
|
|
- name: Install Ubuntu Dependencies
|
|
if: startsWith(matrix.os, 'ubuntu')
|
|
run: |
|
|
sudo apt update && sudo apt install -y xfonts-75dpi xfonts-base libssl3
|
|
export WKHTML_URL=https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-2/
|
|
export WKHTML_DEB=wkhtmltox_0.12.6.1-2.jammy_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: |
|
|
export WKHTML_URL=https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-2/
|
|
export WKHTML_PKG=wkhtmltox-0.12.6-2.macos-cocoa.pkg
|
|
curl -L ${WKHTML_URL}${WKHTML_PKG} -O && sudo installer -pkg ${WKHTML_PKG} -target ~ && rm -rf ${WKHTML_PKG}
|
|
|
|
- name: Install Windows Dependencies
|
|
if: startsWith(matrix.os, 'windows')
|
|
run: |
|
|
choco install wkhtmltopdf
|
|
|
|
- name: Install Python dependencies
|
|
run: |
|
|
poetry install --only main --no-root --no-interaction --no-ansi || poetry install --only main --no-root --no-interaction --no-ansi || poetry install --only main --no-root --no-interaction --no-ansi
|
|
|
|
- name: Migrate Database
|
|
run: |
|
|
poetry run python manage.py makemigrations
|
|
poetry run python manage.py makemigrations StaticAnalyzer
|
|
poetry run python manage.py migrate
|
|
poetry run python manage.py create_roles
|
|
|
|
- uses: actions/setup-java@v4
|
|
with:
|
|
distribution: 'temurin'
|
|
java-version: '21'
|
|
|
|
- name: Unit Tests on Ubuntu, macOS and Windows
|
|
run: |
|
|
java -version
|
|
git submodule update --init --recursive
|
|
poetry run python manage.py test mobsf
|
|
|
|
- name: Python Package Test in Ubuntu and macOS
|
|
if: startsWith(matrix.os, 'ubuntu') || startsWith(matrix.os, 'macOS')
|
|
run: |
|
|
poetry build
|
|
python -m pip install dist/*.whl
|
|
mobsf db
|