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

feature: add github action and dependabot #4

Merged
merged 6 commits into from
Nov 20, 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
15 changes: 15 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
version: 2
updates:
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "daily"
commit-message:
prefix: "[pip] "

- package-ecosystem: "github-actions"
directory: "/.github/workflows/"
schedule:
interval: "daily"
commit-message:
prefix: "[github-actions] "
35 changes: 35 additions & 0 deletions .github/workflows/run-tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Tests

on: [pull_request]

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
max-parallel: 4
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
os: ["ubuntu-latest"]

steps:
- name: Checkout repo
uses: actions/[email protected]

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
if: steps.cache-venv.outputs.cache-hit != 'true'
run: pip install ".[test]"

- name: Test with pytest
run: python -m pytest --junitxml=pytest.xml --cov=merkle_zeppelin | tee pytest-result.txt

- name: Make comment with test coverage
uses: MishaKav/[email protected]
if: github.event_name != 'dependabot[bot]'
with:
pytest-coverage-path: ./pytest-result.txt
junitxml-path: ./pytest.xml
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
Expand Down
12 changes: 12 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[pytest]
addopts = --maxfail=2 -rf
console_output_style = progress
minversion = 7.0.0
testpaths = tests/

[coverage:report]
show_missing = True
skip_covered = True
exclude_lines =
def __str__
pragma: no cover