Skip to content

Commit

Permalink
Replace tox with gh-actions matrix
Browse files Browse the repository at this point in the history
- Remove tox.ini and python=3.12
- Update style workflow
- Update testing workflow to support python 3.8, 3.9, 3.10 and 3.11
  • Loading branch information
xjules committed Dec 19, 2023
1 parent 34ca69c commit c01bc56
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 47 deletions.
30 changes: 22 additions & 8 deletions .github/workflows/style.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,31 @@
name: Lint
name: Style

on: [pull_request]

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Install tox
run: pip install tox
- name: Run style
run: tox -e style
python-version: 3.11
- name: Install dependencies
run: |
pip install -U pip
pip install black flake8 pylint
pip install -r test_requirements.txt
pip install .
- name: Run black
run: |
black --check .
- name: Run flake8
run: |
flake8 --max-line-length=88
- name: Run pylint
run: |
pylint stea tests
20 changes: 12 additions & 8 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,24 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10"]
os: [ ubuntu-latest ]
python-version: ["3.8", "3.9", "3.10", "3.11"]
os: [ubuntu-latest]
include:
- python-version: 3.8
os: macos-latest

steps:
- uses: "actions/checkout@v2"
- uses: "actions/setup-python@v2"
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: "${{ matrix.python-version }}"

- name: "Install dependencies"
run: python -m pip install tox tox-gh-actions
- name: Install dependencies
run: |
pip install -U pip
pip install -r test_requirements.txt
pip install .
- name: "Run tox targets on ${{ matrix.os }} for ${{ matrix.python-version }}"
run: tox
- name: Test with pytest
run: |
pytest
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Topic :: Scientific/Engineering",
"Topic :: Software Development :: Libraries :: Python Modules",
],
Expand Down
31 changes: 0 additions & 31 deletions tox.ini

This file was deleted.

0 comments on commit c01bc56

Please sign in to comment.