Skip to content

Merge pull request #3 from cowdao-grants/swap-on-cowswap #7

Merge pull request #3 from cowdao-grants/swap-on-cowswap

Merge pull request #3 from cowdao-grants/swap-on-cowswap #7

Workflow file for this run

name: Python CI
on:
pull_request:
push:
branches: [main]
workflow_dispatch:
env:
COWSWAP_TEST_PRIVATE_KEY: ${{ secrets.COWSWAP_TEST_PRIVATE_KEY }}
jobs:
mypy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/python_prepare
- name: Run mypy
run: poetry run mypy
pytest:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ '3.10.x', '3.11.x', '3.12.x' ]
name: pytest - Python ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/python_prepare
- name: Run pytest unit tests
run: poetry run python -m pytest tests/
black:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/python_prepare
- name: Check with black
run: poetry run black --check .
autoflake:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/python_prepare
- name: Check with autoflake
run: |
poetry run autoflake --in-place --remove-all-unused-imports --remove-unused-variables --recursive .
git diff --exit-code --quiet || exit 1
isort:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/python_prepare
- name: Check with isort
run: |
poetry run isort --profile black .
git diff --exit-code --quiet || exit 1