Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved CI & new Python #93

Merged
merged 4 commits into from
Oct 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 18 additions & 32 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,22 @@
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Python application

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

name: CI
on: [pull_request, push]
jobs:
build:

#################### Unittests ####################
unittest:
runs-on: ubuntu-latest

strategy:
matrix:
python-version: [3.8,3.9,"3.10","3.12"]
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.10
uses: actions/[email protected]
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest tox
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with tox
run: |
tox
- name: Check out code from GitHub
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
id: python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: pip install --upgrade pip setuptools wheel tox
- name: Run unittest
run: tox -v -e ${{ matrix.python-version }}-unit -- -v
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
Ask Solem <[email protected]>
Asif Saif Uddin <[email protected]>
Ionel Cristian Mărieș <[email protected]>
Fahad Siddiqui <[email protected]>
17 changes: 11 additions & 6 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
[tox]
envlist =
3.7
3.8
3.9
3.10
pypy3
{pypy3,3.12,3.8,3.9,3.10}-unit
flake8
apicheck
pydocstyle


[testenv]
deps=
-r{toxinidir}/requirements/test.txt
Expand All @@ -18,7 +15,15 @@ deps=
flake8,pydocstyle: -r{toxinidir}/requirements/pkgutils.txt
sitepackages = False
recreate = False
commands = py.test -xv --cov=vine --cov-report=xml --no-cov-on-fail
commands = py.test -xv --cov=vine --cov-report=xml --no-cov-on-fail t/unit {posargs}

basepython =
flake8,apicheck,linkcheck,pydocstyle: python3.10
pypy3: pypy3.10
3.8: python3.8
3.9: python3.9
3.10: python3.10
3.12: python3.12

[testenv:apicheck]
commands =
Expand Down