Dependency version refresh #689
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: Build | |
on: | |
pull_request: | |
branches: | |
- '**' | |
push: | |
branches: | |
- master | |
jobs: | |
docker-build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Build Docker image | |
run: docker build -t pyrdp . | |
- name: "Smoke test docker image: pyrdp-convert" | |
run: docker run pyrdp pyrdp-convert -h | |
- name: "Smoke test docker image: pyrdp-player" | |
run: docker run pyrdp pyrdp-player -h | |
- name: "Smoke test docker image: pyrdp-mitm" | |
run: docker run pyrdp pyrdp-mitm -h | |
- name: Build slim Docker image | |
run: docker build -f Dockerfile.slim -t pyrdp . | |
- name: "Smoke test docker image: pyrdp-convert" | |
run: docker run pyrdp pyrdp-convert -h | |
- name: "Smoke test docker image: pyrdp-player" | |
run: docker run pyrdp pyrdp-player -h | |
- name: "Smoke test docker image: pyrdp-mitm" | |
run: docker run pyrdp pyrdp-mitm -h | |
install-and-test-ubuntu: | |
strategy: | |
matrix: | |
os: [ubuntu-22.04, ubuntu-20.04] | |
# Lets try to keep testing an LTS python and latest python | |
python-version: ['3.7', '3.11'] | |
runs-on: ${{ matrix.os }} | |
name: Install and test on Ubuntu ${{ matrix.os }} with Python ${{ matrix.python-version }} | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v1 | |
with: | |
python-version: ${{ matrix.python-version }} | |
architecture: 'x64' | |
- name: Python version | |
run: python --version | |
- name: Pip version | |
run: pip --version | |
- name: Update apt | |
run: sudo apt update -y | |
- name: Install setuptools | |
run: sudo apt install python3-setuptools | |
- name: Install PyRDP dependencies | |
run: sudo apt install libgl1-mesa-glx git python3-dev | |
- name: Install wheel | |
working-directory: . | |
run: pip install wheel | |
- name: Install PyRDP | |
working-directory: . | |
run: pip install -U -e .[full] | |
- name: Install ci dependencies | |
run: pip install -r requirements-ci.txt | |
- name: Extract test files | |
uses: DuckSoft/extract-7z-action@v1.0 | |
with: | |
pathSource: test/files/test_files.zip | |
pathTarget: test/files | |
- name: Extract test file for regression test 428 | |
uses: DuckSoft/extract-7z-action@v1.0 | |
with: | |
pathSource: test/files/test_convert_428.zip | |
pathTarget: test/files | |
- name: Integration Test with a prerecorded PCAP. | |
working-directory: ./ | |
run: coverage run test/test_prerecorded.py | |
- name: pyrdp-mitm initialization integration test | |
working-directory: ./ | |
run: coverage run --append test/test_mitm_initialization.py dummy_value | |
- name: Running pyrdp-player and pyrdp-convert integration tests with verifications | |
working-directory: ./ | |
run: ./test/integration.sh | |
- name: Run unit tests | |
working-directory: ./ | |
run: coverage run --append -m unittest discover -v | |
- name: Coverage report | |
working-directory: ./ | |
run: coverage report --fail-under=40 | |
install-and-test-windows: | |
runs-on: windows-latest | |
strategy: | |
matrix: | |
# Lets try to keep testing an LTS python and latest python | |
# FIXME: Windows with 3.11 doesn't work since PySide2 isn't supported. see #436 | |
python-version: ['3.7', '3.10'] | |
name: Install and test on Windows with Python ${{ matrix.python-version }} | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v1 | |
with: | |
python-version: ${{ matrix.python-version }} | |
architecture: 'x64' | |
- name: Python version | |
run: python --version | |
- name: Pip version | |
run: pip --version | |
- name: Install wheel | |
working-directory: . | |
run: pip install wheel | |
- name: Install PyRDP | |
working-directory: . | |
run: pip install -U -e .[full] | |
- name: Install coverage | |
working-directory: . | |
run: pip install coverage | |
- name: Extract test files | |
uses: DuckSoft/extract-7z-action@v1.0 | |
with: | |
pathSource: test/files/test_files.zip | |
pathTarget: test/files | |
- name: Integration Test with a prerecorded PCAP. | |
working-directory: ./ | |
run: coverage run test/test_prerecorded.py | |
- name: pyrdp-mitm initialization test | |
working-directory: ./ | |
run: coverage run --append test/test_mitm_initialization.py dummy_value | |
- name: pyrdp-player read a replay in headless mode test | |
working-directory: ./ | |
run: coverage run --append -m pyrdp.bin.player --headless test/files/test_session.replay | |
- name: pyrdp-convert to MP4 | |
working-directory: ./ | |
run: coverage run --append -m pyrdp.bin.convert test/files/test_convert.pyrdp -f mp4 | |
- name: Verify the MP4 file | |
working-directory: ./ | |
run: file test_convert.mp4 | grep "MP4 Base Media" | |
- name: Run unit tests | |
working-directory: ./ | |
run: coverage run --append -m unittest discover -v | |
- name: Coverage report | |
working-directory: ./ | |
run: coverage report --fail-under=40 |