Skip to content

Commit

Permalink
Add tox ci
Browse files Browse the repository at this point in the history
  • Loading branch information
eleftherioszisis committed Apr 23, 2024
1 parent a4d742e commit a18f901
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 10 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/tox.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Tox

on:
workflow_dispatch:
pull_request:
push:
branches:
- main
release:
types:
- published

jobs:
tox_checks:

runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']

steps:

- uses: actions/checkout@v4
with:
submodules: true

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools
pip install tox-gh-actions
- name: Run tox
run: tox
3 changes: 0 additions & 3 deletions .gitlab-ci.yml

This file was deleted.

23 changes: 16 additions & 7 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,26 @@ testdeps =
envlist =
check-version
lint
py{38,39,310}
py{38,39,310,311,312}
functional

ignore_basepython_conflict = true

[testenv]
extras = all
setenv =
PIP_INDEX_URL = https://bbpteam.epfl.ch/repository/devpi/simple

SALLOC_ACCOUNT = {env:SALLOC_ACCOUNT:proj66}
deps = {[base]testdeps}
commands = pytest tests/unit
basepython = python3.10

[testenv:check-version]
[testenv:check-packaging]
skip_install = true
deps = bbp-nse-ci
commands = do_release.py -p . check-version
deps =
build
twine
commands =
python -m build -o {envtmpdir}/dist
twine check {envtmpdir}/dist/*

[testenv:lint]
deps =
Expand Down Expand Up @@ -98,3 +99,11 @@ commands =
exclude = extras,workflow,tests
ignore = E126, E127, E128, E203, E731, W503, W504
max-line-length = 100

[gh-actions]
python =
3.8: py38, lint
3.9: py39
3.10: py310, coverage
3.11: py311, check-packaging
3.12: py312, docs

0 comments on commit a18f901

Please sign in to comment.