Skip to content

Commit

Permalink
Migrate to poetry and optimized dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
ostefano committed Aug 15, 2024
1 parent 1bdb24c commit 1f4b3b1
Show file tree
Hide file tree
Showing 15 changed files with 5,722 additions and 4,180 deletions.
25 changes: 9 additions & 16 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ jobs:
- name: Compile and install yara
run: |
sudo apt-get install automake libtool make gcc pkg-config
wget https://github.com/VirusTotal/yara/archive/refs/tags/v4.5.0.tar.gz
tar xzf *.tar.gz
wget https://github.com/VirusTotal/yara/archive/refs/tags/v4.5.0.tar.gz -O yara.tar.gz
tar xzf yara.tar.gz
pushd yara-*
./bootstrap.sh
./configure
Expand All @@ -38,31 +38,24 @@ jobs:
cache: 'pip'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest
pip install pipenv
sed -i "s/python_version.*/python_version = \"${{ matrix.python-version }}\"/" Pipfile
pipenv lock
pipenv requirements > requirements.txt
# pyfaul must be installed manually (?)
pip install -r requirements.txt pyfaup
pip install .
python -m pip install --upgrade poetry
poetry install
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
poetry run flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
poetry run flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Run server in background
run: |
misp-modules -l 127.0.0.1 -s 2>error.log &
sleep 3
poetry run misp-modules -l 127.0.0.1 -s 2>error.log &
sleep 10
- name: Check if server is running
run: |
curl -sS localhost:6666/healthcheck
- name: Test with pytest
run: |
pytest tests
poetry run pytest
- name: Show error log
if: always()
run: |
Expand Down
87 changes: 0 additions & 87 deletions Pipfile

This file was deleted.

Loading

0 comments on commit 1f4b3b1

Please sign in to comment.