diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..dd79e3e --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,35 @@ +name: Test and Lint +on: + push: + branches: [ $default-branch ] + pull_request: + branches: [ $default-branch ] + +jobs: + build: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: ["3.8", "3.9", "3.10"] + + steps: + - uses: actions/checkout@v3 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v3 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip install flake8 pytest + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + - 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 + # 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 + - name: Test with pytest + run: | + pytest -vvv --cov=pcapng --cov-report=term-missing tests diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index a31842c..0000000 --- a/.travis.yml +++ /dev/null @@ -1,20 +0,0 @@ -dist: xenial - -language: python - -branches: - except: - - gh-pages - -python: - - "3.5" - - "3.6" - - "3.7" - - "3.8" - - "3.9-dev" - -install: - - pip install .[dev] - -script: - - py.test -vvv --cov=pcapng --cov-report=term-missing tests diff --git a/setup.cfg b/setup.cfg index 040ad88..fb9d58c 100644 --- a/setup.cfg +++ b/setup.cfg @@ -13,10 +13,9 @@ license_files = classifiers = Development Status :: 5 - Production/Stable License :: OSI Approved :: Apache Software License - Programming Language :: Python :: 3.5 - Programming Language :: Python :: 3.6 - Programming Language :: Python :: 3.7 Programming Language :: Python :: 3.8 + Programming Language :: Python :: 3.9 + Programming Language :: Python :: 3.10 Programming Language :: Python :: Implementation :: CPython [options]