Fixing bug executing setup.sh script in python venv #1000
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'] | |
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: | | |
brew install --cask wkhtmltopdf | |
- 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 |