diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..bec87b2 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,30 @@ +name: CI +on: + workflow_dispatch: + pull_request: + push: + branches: + - 'main' + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: astral-sh/setup-uv@v5 + - uses: actions/setup-python@v5 + with: + python-version-file: 'pyproject.toml' + + - name: Install dependencies + run: uv sync --all-extras --dev + + - uses: astral-sh/ruff-action@v3 + + - uses: ApeWorX/github-action@v3 + with: + ape-version-pin: '0.8.25' + + - name: Run tests + run: ape test -s diff --git a/.gitignore b/.gitignore index 505a3b1..2d97033 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,6 @@ wheels/ # Virtual environments .venv + +# Unit test +.pytest_cache/ \ No newline at end of file diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..794d0f1 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,7 @@ +repos: + - repo: https://github.com/astral-sh/ruff-pre-commit + rev: v0.9.4 + hooks: + - id: ruff + args: [--fix] + - id: ruff-format diff --git a/ape-config.yaml b/ape-config.yaml new file mode 100644 index 0000000..c4ff42d --- /dev/null +++ b/ape-config.yaml @@ -0,0 +1,11 @@ +name: cow-agent + +plugins: + - name: alchemy + version: 0.8.7 + - name: etherscan + version: 0.8.4 + - name: foundry + version: 0.8.7 + - name: solidity + version: 0.8.5 diff --git a/tests/test_add.py b/tests/test_add.py new file mode 100644 index 0000000..48fe0df --- /dev/null +++ b/tests/test_add.py @@ -0,0 +1,2 @@ +def test_add(): + assert 1 + 1 == 2