diff --git a/.github/workflows/fuzz-lightyear-build.yml b/.github/workflows/fuzz-lightyear-build.yml new file mode 100644 index 0000000..9219a96 --- /dev/null +++ b/.github/workflows/fuzz-lightyear-build.yml @@ -0,0 +1,34 @@ +# This workflow will install Python dependencies, run tests and lint with a variety of Python versions +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python + +name: fuzz-lightyear-build + +on: + push: + branches: [ "master" ] + pull_request: + workflow_dispatch: + schedule: + - cron: '0 0 1 * *' + +jobs: + build: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, macos-latest, windows-latest] + steps: + - uses: actions/checkout@v3 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v3 + with: + # tests.result_test.test_successful_sequence is flaky in GA's version of python (3.8.17) + # fixing to current python version of devbox + # also, 3.8.13 is not available for platform==win32; so setting a range + python-version: '>=3.8.10 <=3.8.13' + + - name: Install dependencies and test + run: | + python -m pip install --upgrade pip setuptools tox virtualenv + tox diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 6b329c9..0000000 --- a/.travis.yml +++ /dev/null @@ -1,14 +0,0 @@ -language: python -matrix: - include: - - python: 3.6 - env: TOXENV=py36 - - python: 3.7 - env: TOXENV=py37 - sudo: required # required for Python >= 3.7 (travis-ci/travis-ci#9069) - dist: xenial # required for Python >= 3.7 (travis-ci/travis-ci#9069) - - python: 3.6 - env: TOXENV=pre-commit -install: - - pip install tox -script: make test diff --git a/README.md b/README.md index acceb94..1c078d1 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![Build Status](https://travis-ci.com/Yelp/fuzz-lightyear.svg?branch=master)](https://travis-ci.com/Yelp/fuzz-lightyear) +[![Build Status](https://github.com/Yelp/fuzz-lightyear/actions/workflows/fuzz-lightyear-build.yml/badge.svg)](https://github.com/Yelp/fuzz-lightyear/actions/workflows/fuzz-lightyear-build.yml) # fuzz-lightyear diff --git a/requirements-dev-minimal.txt b/requirements-dev-minimal.txt index 67bcc0d..94806a4 100644 --- a/requirements-dev-minimal.txt +++ b/requirements-dev-minimal.txt @@ -2,6 +2,7 @@ coverage flask flask-restplus +multiprocess mypy pre-commit pytest diff --git a/requirements-dev.txt b/requirements-dev.txt index bf03d0b..efb73d1 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -27,6 +27,7 @@ MarkupSafe==1.1.1 monotonic==1.5 more-itertools==7.2.0 msgpack-python==0.5.6 +multiprocess==0.70.15 mypy==0.720 mypy-extensions==0.4.1 nodeenv==1.3.3 diff --git a/testing/mock_server.py b/testing/mock_server.py index fb90073..f975f68 100644 --- a/testing/mock_server.py +++ b/testing/mock_server.py @@ -1,12 +1,12 @@ import json import logging -import multiprocessing as mp import os from contextlib import contextmanager from contextlib import redirect_stdout from time import sleep import requests +from multiprocess import Process from testing.vulnerable_app.__main__ import main as start_server @@ -32,7 +32,7 @@ def spin_up_server(): is_it_up = is_server_up() if not is_it_up: starting_up = True - mp.Process( + Process( target=spin_up_server, ).start() diff --git a/tox.ini b/tox.ini index f8bec24..8b99d31 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,6 @@ [tox] project = fuzz_lightyear -# These should match the travis env list +# These should match the .github/workflows/fuzz-lightyear-build env list envlist = pre-commit,py38 skip_missing_interpreters = true tox_pip_extensions_ext_venv_update = true