44 lines
1.3 KiB
YAML
44 lines
1.3 KiB
YAML
name: Test Netzob
|
|
on:
|
|
pull_request:
|
|
|
|
jobs:
|
|
test:
|
|
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
python-version: ["3.8", "3.10"]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Set up Python ${{ matrix.python-version }}
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
# You can test your matrix by printing the current Python version
|
|
- name: Install Netzob
|
|
run: |
|
|
sudo apt-get install -y python3 python3-dev python3-setuptools virtualenv build-essential libpcap-dev libgraph-easy-perl libffi-dev
|
|
mkdir venv
|
|
virtualenv venv
|
|
source venv/bin/activate
|
|
pip3 install Cython==0.29.32
|
|
pip3 install -e .
|
|
- name: Run test
|
|
run: |
|
|
source venv/bin/activate
|
|
python3 setup.py test
|
|
- name: Generate documentation
|
|
run: |
|
|
source venv/bin/activate
|
|
sphinx-build -b html doc/documentation/source/ doc/documentation/build/
|
|
- name: Deploy pages
|
|
uses: peaceiris/actions-gh-pages@v3
|
|
#if: ${{ github.event_name == 'push' }} # && github.ref == 'refs/heads/master' }}
|
|
with:
|
|
publish_branch: gh-pages
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
publish_dir: doc/documentation/build/
|
|
force_orphan: true
|