-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
first draft for ci pipeline with github action
- Loading branch information
Showing
4 changed files
with
59 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |