Skip to content

Commit

Permalink
chore: uv uv uv uv
Browse files Browse the repository at this point in the history
  • Loading branch information
heswithme committed Oct 9, 2024
1 parent 255d636 commit ce0d8d8
Show file tree
Hide file tree
Showing 5 changed files with 2,846 additions and 4,769 deletions.
40 changes: 22 additions & 18 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,27 @@ name: CI Workflow
on: [push]

jobs:

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

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v3
with:
version: "0.4.18"
enable-cache: true # Enables built-in caching for uv

- name: Setup Python 3.12.6
- name: Set up Python 3.12.6
uses: actions/setup-python@v5
with:
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
Expand All @@ -28,24 +32,24 @@ jobs:
fail-fast: false

steps:
- uses: actions/checkout@v3

# install poetry to allow cacheing
- name: Install poetry
run: pipx install poetry
- uses: actions/checkout@v4

- name: Setup Python 3.12.6
uses: actions/setup-python@v5
- name: Install uv
uses: astral-sh/setup-uv@v3
with:
python-version: 3.12.6
cache: 'poetry'
version: "0.4.18"
enable-cache: true # Enables built-in caching for uv

- name: Set up Python 3.12.6
run: uv python install 3.12.6

# Install dependencies with all extras (including dev)
- name: Install Requirements
run: |
poetry config virtualenvs.in-project true
poetry install
run: uv sync --extra=dev

# Run tests with environment variables
- name: Run Tests
env:
ETH_RPC_URL: ${{ secrets.ETH_RPC_URL }}
ETHERSCAN_API_KEY: ${{ secrets.ETHERSCAN_API_KEY }}
run: |
poetry run pytest -n auto
run: uv run pytest -n auto
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ repos:
rev: 5.13.2
hooks:
- id: isort
args: ["--profile", "black", --line-length=100]
args: ["--profile", "black", "--line-length=100"]

default_language_version:
python: python3.12
Loading

0 comments on commit ce0d8d8

Please sign in to comment.