diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml new file mode 100644 index 0000000..2629cbd --- /dev/null +++ b/.github/workflows/tests.yaml @@ -0,0 +1,51 @@ +name: test +on: + push: + branches: + - "master" + - "feature/*" + - "hotfix/*" + - "release/*" + - "renovate/*" + pull_request: + workflow_dispatch: + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Install dependencies + run: make setup + - name: Run Linters + run: make lint + test: + strategy: + matrix: + platform: [ubuntu-latest, macos-latest] + runs-on: ${{ matrix.platform }} + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: | + 3.8 + 3.9 + 3.10 + 3.11 + 3.12 + cache: 'pip' + - name: Install dependencies + run: | + make setup + pip install tox-gh + - name: Run tests + run: tox -m ci + env: + PYTEST_ADDOPTS: "--no-header -vv -rN" diff --git a/test-requirements.txt b/test-requirements.txt index 2f26d5e..0984b89 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -5,9 +5,9 @@ coverage==7.3.2 extras==1.0.0 fixtures==3.0.0 flake8==2.4.0 -httmock==1.2.5 +httmock==1.4.0 linecache2==1.0.0 -mock==1.0.1 +mock==5.1.0 nose2==0.13.0 pbr==3.1.1 python-mimeparse==1.6.0 diff --git a/tox.ini b/tox.ini index 706eac9..f9860bf 100644 --- a/tox.ini +++ b/tox.ini @@ -2,7 +2,7 @@ # Licensed under the LGPLv3, see LICENCE file for details. [tox] -envlist = lint, py27, py35, docs +envlist = lint, py3.8, docs # envlist = py27 # If the system has tox < 4.8, installs a newer tox in a venv. minversion = 4.8 @@ -17,6 +17,9 @@ commands = deps = -r{toxinidir}/test-requirements.txt +[testenv:py3.{8,9,10,11,12,13}] +labels = ci + [testenv:devenv] envdir = devenv usedevelop = True