diff --git a/.github/workflows/mobsf_test.yml b/.github/workflows/mobsf_test.yml new file mode 100644 index 00000000..2da52ac6 --- /dev/null +++ b/.github/workflows/mobsf_test.yml @@ -0,0 +1,37 @@ +name: MobSF tests + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up Python 3.8 + uses: actions/setup-python@v2 + with: + python-version: 3.8 + - name: Install Host Dependencies + run: | + sudo apt install -y openjdk-8-jdk python3-dev python3-pip build-essential libffi-dev libssl-dev libxml2-dev libxslt1-dev libjpeg8-dev zlib1g-dev wkhtmltopdf + - 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/yara-python.git@v3.11.0" && pip install --no-index --find-links=yara-python yara-python) + pip install -r requirements.txt + - name: Migrate and Setup Env + run: | + python manage.py makemigrations + python manage.py makemigrations StaticAnalyzer + python manage.py migrate + git submodule update --init --recursive + - name: Lint + run: | + tox -e lint + - name: Unit Tests + run: | + python manage.py test