Skip to content

Commit

Permalink
add github actions testing workflow
Browse files Browse the repository at this point in the history
also update some dependencies
  • Loading branch information
aromanielloNTIA committed May 8, 2023
1 parent fab8bdd commit 9326a6b
Show file tree
Hide file tree
Showing 3 changed files with 78 additions and 6 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/tox.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Tox

on:
workflow_dispatch:
push:
branches:
- master
paths:
- scos_actions
pull_request:
branches:
- master
paths:
- scos_actions

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progess: true

jobs:
run-all-tests:
name: Py${{ matrix.py }} / ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-20.04
py:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
steps:
- name: Set up Python ${{ matrix.py }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.py }}
- name: Checkout scos-actions
uses: actions/checkout@v3
- name: Install tox-gh
run: python -m pip install tox-gh
- name: Set up test suite
run: tox r -vv --notest
- name: Run test suite
run: tox r --skip-pkg-install
env:
PYTEST_ADDOPTS: "-vv --durations=0"
13 changes: 7 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ classifiers = [
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
]

dependencies = [
Expand All @@ -56,15 +57,15 @@ dependencies = [

[project.optional-dependencies]
test = [
"pytest>=7.1.2",
"pytest-cov>=3.0.0",
"tox>=3.0",
"pytest>=7.3.1,<8.0",
"pytest-cov>=4.0.0,<5.0",
"tox>=4.5.1,<5.0",
]
dev = [
"scos-actions[test]",
"hatchling>=1.6.0,<2.0",
"pre-commit>=2.20.0",
"twine>=4.0.1,<5.0",
"hatchling>=1.14.1,<2.0",
"pre-commit>=3.3.1,<4.0",
"twine>=4.0.2,<5.0",
]

[project.urls]
Expand Down
23 changes: 23 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[tox]
env_list =
py38
py39
py310
py311
min_version = 4.5.1
skip_missing_interpreters = true
no_package = false

[testenv]
description = Run tests with pytest and generate coverage report
package = wheel
wheel_build_env = .pkg
extras = test
commands = pytest --cov-report term-missing --no-cov-on-fail --cov {posargs}

[gh] ; GitHub Actions CI with tox-gh
python =
3.8 = py38
3.9 = py39
3.10 = py310
3.11 = py311

0 comments on commit 9326a6b

Please sign in to comment.