Skip to content

Commit

Permalink
Add GitHub workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
lengau committed Sep 19, 2024
1 parent 249ff49 commit e4d8e21
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 3 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
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
- name: Run tests
run: tox -m ci
env:
PYTEST_ADDOPTS: "--no-header -vv -rN"
4 changes: 2 additions & 2 deletions test-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit e4d8e21

Please sign in to comment.