Merge pull request #782 from zeroSteiner/fix/met/php-socket-channel-t… #265
Workflow file for this run
This file contains hidden or 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: Python | |
| # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions | |
| permissions: | |
| actions: none | |
| checks: none | |
| contents: none | |
| deployments: none | |
| id-token: none | |
| issues: none | |
| discussions: none | |
| packages: none | |
| pages: none | |
| pull-requests: none | |
| repository-projects: none | |
| security-events: none | |
| statuses: none | |
| on: | |
| push: | |
| paths: | |
| - 'python/**' | |
| - '.github/**' | |
| pull_request: | |
| paths: | |
| - 'python/**' | |
| - '.github/**' | |
| jobs: | |
| verify: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: | |
| - macos-13 | |
| - windows-2022 | |
| - windows-2025 | |
| - ubuntu-22.04 | |
| runtime_version: | |
| - 3.6 | |
| - 3.7 | |
| - 3.8 | |
| - 3.11 | |
| - 3.12 | |
| - 3.13 | |
| include: | |
| # We run older Python versions in Docker - as Github Actions does not support installing these versions on the host | |
| - { os: ubuntu-latest, runtime_version: 2.7, docker_image: 'python:2.7-alpine' } | |
| - { os: ubuntu-latest, runtime_version: 3.3, docker_image: 'python:3.3-alpine' } | |
| - { os: ubuntu-latest, runtime_version: 3.4, docker_image: 'python:3.4-alpine' } | |
| - { os: ubuntu-latest, runtime_version: 3.5, docker_image: 'python:3.5-alpine' } | |
| - { os: ubuntu-latest, runtime_version: 3.6, docker_image: 'python:3.6-alpine' } | |
| exclude: | |
| # Older install not available | |
| - { os: ubuntu-22.04, runtime_version: 3.6 } | |
| # Tests fail on windows 3.12/3.13 - https://github.com/rapid7/metasploit-payloads/issues/751 | |
| - { os: windows-2022, runtime_version: 3.12 } | |
| - { os: windows-2022, runtime_version: 3.13 } | |
| - { os: windows-2025, runtime_version: 3.12 } | |
| - { os: windows-2025, runtime_version: 3.13 } | |
| timeout-minutes: 40 | |
| runs-on: ${{ matrix.os }} | |
| name: Python ${{ matrix.runtime_version }} ${{ matrix.docker_image && 'Docker' || matrix.os }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Run tests in docker | |
| if: ${{ matrix.docker_image }} | |
| env: | |
| DOCKER_IMAGE: ${{ matrix.docker_image }} | |
| run: | | |
| cd python/meterpreter | |
| docker run --rm -w $(pwd) -v $(pwd):$(pwd) ${DOCKER_IMAGE} /bin/sh -c 'ls -lah; pip install mock; python -m unittest discover -v ./tests' | |
| - name: Set up Python on host | |
| if: ${{ !matrix.docker_image }} | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: ${{ matrix.runtime_version }} | |
| - name: Run tests on host | |
| if: ${{ !matrix.docker_image }} | |
| run: | | |
| cd python/meterpreter | |
| python -m unittest discover -v ./tests |