Skip to content

Commit

Permalink
first draft for ci pipeline with github action
Browse files Browse the repository at this point in the history
  • Loading branch information
Deathn0t committed Oct 4, 2024
1 parent b6d193b commit 7e46158
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 2 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Continuous integration

on:
- pull_request
- push


jobs:

test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- "3.12"
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install --upgrade pip
pip install tox pylint black
# - name: Run Formatter
# run: black --diff --check $(git ls-files '*.py')
- name: Run Linter
run: pylint --exit-zero $(git ls-files '*.py')
- name: Run tests with tox
run: tox -e py3
- name: Upload coverage report
if: ${{ matrix.python-version == 3.12 }} # Only upload coverage once
uses: codecov/codecov-action@v1
4 changes: 4 additions & 0 deletions publications/2023-neurips/pytest.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[pytest]
norecursedirs = .git
filterwarnings =
ignore:The objective has been evaluated at this point before.:UserWarning
4 changes: 2 additions & 2 deletions publications/2023-neurips/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ classifiers =
Development Status :: 3 - Alpha
Programming Language :: Python
Programming Language :: Python :: 3
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Programming Language :: Python :: 3.12

[options]
packages = find:
Expand Down
19 changes: 19 additions & 0 deletions publications/2023-neurips/tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# content of: tox.ini , put in same dir as setup.py
[tox]
# python3 interpreter of the user.
envlist = py3

[testenv]
# install pytest in the virtualenv where commands will be executed
deps = pytest
coverage
commands =
# NOTE: you can run any command line tool here - not just tests
coverage run --source=publications/2023-neurips/lcdb/ -m pytest test/
coverage html
coverage xml

[flake8]
max-line-length = 88
select = C,E,F,W,B,B950
extend-ignore = E203, E501, W503, W605, E741

0 comments on commit 7e46158

Please sign in to comment.