mirror of
https://github.com/MobSF/Mobile-Security-Framework-MobSF.git
synced 2026-10-12 02:06:59 +00:00
* ci: bump Actions versions, pin Docker actions, add Dependabot Keep CI supply chain current after the Docker SBOM work: update test, publish, and CodeQL workflows, SHA-pin Docker setup/login actions, and enable weekly GitHub Actions Dependabot updates. Co-authored-by: Cursor <[email protected]> * docker: use Postgres latest and PG18 data volume layout Co-authored-by: Cursor <[email protected]> * Bump version to 4.5.2 Co-authored-by: Cursor <[email protected]> --------- Co-authored-by: Cursor <[email protected]>
90 lines
2.8 KiB
YAML
90 lines
2.8 KiB
YAML
name: MobSF tests
|
|
|
|
on:
|
|
push:
|
|
branches: [ master ]
|
|
pull_request:
|
|
branches: [ master ]
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
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@v7
|
|
- name: Set up Python ${{ matrix.python-version }}
|
|
uses: actions/setup-python@v7
|
|
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@v5
|
|
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
|