ruff.yaml 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. name: ruff
  2. on:
  3. push:
  4. paths:
  5. - '.github/workflows/ruff.yaml'
  6. - '.github/build-requirements.txt'
  7. - 'pyproject.toml'
  8. - 'setup.cfg'
  9. - 'test/ref/**'
  10. - 'cmds/**'
  11. - '**.py'
  12. - '**.c'
  13. jobs:
  14. test:
  15. runs-on: ubuntu-latest
  16. strategy:
  17. matrix:
  18. python-version: ["3.9", "3.11", "3.12"]
  19. steps:
  20. - uses: actions/checkout@v4
  21. - name: Install Ubuntu package dependencies
  22. run: |
  23. sudo apt-get install libsecp256k1-dev
  24. - name: Set up Python ${{ matrix.python-version }}
  25. uses: actions/setup-python@v4
  26. with:
  27. python-version: ${{ matrix.python-version }}
  28. cache: 'pip'
  29. cache-dependency-path: |
  30. .github/build-requirements.txt
  31. setup.cfg
  32. - name: Install Python dependencies
  33. run: |
  34. python3 -m pip install pip setuptools build wheel
  35. python3 -m pip install gmpy2 cryptography pynacl ecdsa aiohttp requests pexpect scrypt semantic-version
  36. python3 -m pip install pycryptodomex pysocks pycoin ipaddress varint ruff
  37. python3 -m pip install py_ecc mypy_extensions monero eth-keys
  38. python3 setup.py build_ext --inplace
  39. - name: Check the code with Ruff static code analyzer
  40. env:
  41. PYTHONPATH: .
  42. run: |
  43. ruff check --output-format=github mmgen
  44. ruff check --output-format=github test