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

chore: CI update #5

Closed
wants to merge 24 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
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
41 changes: 37 additions & 4 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,51 @@
name: pre-commit
name: CI Workflow

on: [push]
on: [push, pull_request]

jobs:

# Linting with Pre-commit
lint:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Setup Python 3.10.4
- name: Setup Python 3.12.6
uses: actions/setup-python@v4
with:
python-version: 3.10.4
python-version: 3.12.6

# Run pre-commit hooks (e.g., black, flake8, isort)
- uses: pre-commit/[email protected]


# Test runs
tests:
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
fail-fast: false

steps:
- uses: actions/checkout@v3

# install poetry to allow cacheing
- name: Install poetry
run: pipx install poetry

- name: Setup Python 3.12.6
uses: actions/setup-python@v5
with:
python-version: 3.12.6
cache: 'poetry'
- name: Install Requirements
run: |
poetry config virtualenvs.in-project true
poetry install
- name: Run Tests
env:
ETH_RPC_URL: ${{ secrets.ETH_RPC_URL }}
ETHERSCAN_API_KEY: ${{ secrets.ETHERSCAN_API_KEY }}
run: |
poetry run pytest -n auto
55 changes: 53 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,53 @@
.idea
__pycache__
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# Distribution / packaging
.Python
build/
dist/
*.egg-info/
.eggs/
*.egg
*.wheel
MANIFEST

# Unit test / coverage reports
.tox/
.nox/
.coverage
coverage.xml
*.cover
*.py,cover
.pytest_cache/
htmlcov/

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Jupyter Notebook
.ipynb_checkpoints/

# Pyre type checker
.pyre/

# macOS specific files
.DS_Store

# IDE files
.idea/
.vscode/

# Log files
*.log

# Temporary files
*.tmp
*.swp
7 changes: 5 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ repos:
- id: check-ast
- id: detect-private-key

- repo: https://github.com/psf/black
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 24.8.0
hooks:
- id: black
Expand All @@ -21,7 +21,10 @@ repos:
hooks:
- id: flake8
- repo: https://github.com/pycqa/isort
rev: 5.12.0
rev: 5.13.2
hooks:
- id: isort
args: ["--profile", "black", --line-length=79]

default_language_version:
python: python3.12.6
Loading
Loading