mirror of
https://github.com/MobSF/Mobile-Security-Framework-MobSF.git
synced 2026-10-11 22:50:09 +00:00
Pip to Poetry, Ubuntu Base image Bump, Dockerfile QA, Python 3.11 support (#2244)
* Docker base image update * Docker file QA * Github Actions version update * Removed unwanted pinned repository * Pip to Poetry migration * Bump httptools * Jump yara-python-dex * Python 3.11 support
This commit is contained in:
@@ -11,23 +11,23 @@ jobs:
|
||||
steps:
|
||||
-
|
||||
name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
-
|
||||
name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v1
|
||||
uses: docker/setup-qemu-action@v2
|
||||
-
|
||||
name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
uses: docker/setup-buildx-action@v2
|
||||
-
|
||||
name: Login to DockerHub
|
||||
uses: docker/login-action@v1
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_TOKEN }}
|
||||
-
|
||||
name: Build and push
|
||||
id: docker_build
|
||||
uses: docker/build-push-action@v2
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
push: true
|
||||
context: .
|
||||
|
||||
@@ -10,16 +10,16 @@ jobs:
|
||||
steps:
|
||||
-
|
||||
name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
-
|
||||
name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v1
|
||||
uses: docker/setup-qemu-action@v2
|
||||
-
|
||||
name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
uses: docker/setup-buildx-action@v2
|
||||
-
|
||||
name: Login to DockerHub
|
||||
uses: docker/login-action@v1
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_TOKEN }}
|
||||
@@ -36,7 +36,7 @@ jobs:
|
||||
-
|
||||
name: Build and push release
|
||||
id: docker_build
|
||||
uses: docker/build-push-action@v2
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
push: true
|
||||
context: .
|
||||
|
||||
@@ -11,52 +11,55 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-20.04, macos-latest, windows-latest]
|
||||
python-version: [3.9, '3.10']
|
||||
# exclude:
|
||||
# excludes py38, py39 on Windows
|
||||
# - os: windows-latest
|
||||
# python-version: 3.8
|
||||
os: [ubuntu-22.04, macos-latest, windows-latest]
|
||||
python-version: [3.9, '3.10', '3.11']
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v1
|
||||
uses: actions/setup-python@v3
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- name: Setup Pip
|
||||
|
||||
- name: Setup Pip and Poetry
|
||||
run: |
|
||||
python -m pip install pip==22.3.1
|
||||
python -m pip install pip==22.3.1 poetry==1.6.1
|
||||
|
||||
- name: Lint
|
||||
if: startsWith(matrix.os, 'ubuntu')
|
||||
run: |
|
||||
python -m pip install --upgrade tox
|
||||
tox -e lint
|
||||
|
||||
- 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
|
||||
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: |
|
||||
pip install --use-deprecated=legacy-resolver -r requirements.txt
|
||||
poetry install --only main --no-interaction --no-ansi || poetry install --only main --no-interaction --no-ansi || poetry install --only main --no-interaction --no-ansi
|
||||
|
||||
- name: Migrate Database
|
||||
run: |
|
||||
python manage.py makemigrations
|
||||
python manage.py makemigrations StaticAnalyzer
|
||||
python manage.py migrate
|
||||
poetry run python manage.py makemigrations
|
||||
poetry run python manage.py makemigrations StaticAnalyzer
|
||||
poetry run python manage.py migrate
|
||||
- name: Unit Tests
|
||||
run: |
|
||||
git submodule update --init --recursive
|
||||
python manage.py test mobsf
|
||||
poetry run python manage.py test mobsf
|
||||
|
||||
@@ -10,9 +10,9 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v2
|
||||
uses: actions/setup-python@v3
|
||||
with:
|
||||
python-version: '3.x'
|
||||
- name: Install dependencies
|
||||
|
||||
Reference in New Issue
Block a user