Skip to content

Commit f602f79

Browse files
authored
Improved CI & new Python (#93)
* added Asif Saif Uddin as author * new python on tox and CI setup * new python on tox and CI setup * re structure tox config
1 parent b00897a commit f602f79

File tree

3 files changed

+30
-38
lines changed

3 files changed

+30
-38
lines changed

.github/workflows/ci.yml

Lines changed: 18 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,22 @@
1-
# This workflow will install Python dependencies, run tests and lint with a single version of Python
2-
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
3-
4-
name: Python application
5-
6-
on:
7-
push:
8-
branches: [ master ]
9-
pull_request:
10-
branches: [ master ]
11-
1+
name: CI
2+
on: [pull_request, push]
123
jobs:
13-
build:
144

5+
#################### Unittests ####################
6+
unittest:
157
runs-on: ubuntu-latest
16-
8+
strategy:
9+
matrix:
10+
python-version: [3.8,3.9,"3.10","3.12"]
1711
steps:
18-
- uses: actions/checkout@v2
19-
- name: Set up Python 3.10
20-
uses: actions/[email protected]
21-
with:
22-
python-version: "3.10"
23-
- name: Install dependencies
24-
run: |
25-
python -m pip install --upgrade pip
26-
pip install flake8 pytest tox
27-
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
28-
- name: Lint with flake8
29-
run: |
30-
# stop the build if there are Python syntax errors or undefined names
31-
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
32-
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
33-
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
34-
- name: Test with tox
35-
run: |
36-
tox
12+
- name: Check out code from GitHub
13+
uses: actions/checkout@v4
14+
- name: Set up Python ${{ matrix.python-version }}
15+
id: python
16+
uses: actions/setup-python@v4
17+
with:
18+
python-version: ${{ matrix.python-version }}
19+
- name: Install dependencies
20+
run: pip install --upgrade pip setuptools wheel tox
21+
- name: Run unittest
22+
run: tox -v -e ${{ matrix.python-version }}-unit -- -v

AUTHORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
Ask Solem <[email protected]>
2+
Asif Saif Uddin <[email protected]>
23
Ionel Cristian Mărieș <[email protected]>
34
Fahad Siddiqui <[email protected]>

tox.ini

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
11
[tox]
22
envlist =
3-
3.7
4-
3.8
5-
3.9
6-
3.10
7-
pypy3
3+
{pypy3,3.12,3.8,3.9,3.10}-unit
84
flake8
95
apicheck
106
pydocstyle
117

8+
129
[testenv]
1310
deps=
1411
-r{toxinidir}/requirements/test.txt
@@ -18,7 +15,15 @@ deps=
1815
flake8,pydocstyle: -r{toxinidir}/requirements/pkgutils.txt
1916
sitepackages = False
2017
recreate = False
21-
commands = py.test -xv --cov=vine --cov-report=xml --no-cov-on-fail
18+
commands = py.test -xv --cov=vine --cov-report=xml --no-cov-on-fail t/unit {posargs}
19+
20+
basepython =
21+
flake8,apicheck,linkcheck,pydocstyle: python3.10
22+
pypy3: pypy3.10
23+
3.8: python3.8
24+
3.9: python3.9
25+
3.10: python3.10
26+
3.12: python3.12
2227

2328
[testenv:apicheck]
2429
commands =

0 commit comments

Comments
 (0)