Skip to content

Commit

Permalink
Fix: Code quality was not tested
Browse files Browse the repository at this point in the history
  • Loading branch information
hoh committed Jun 7, 2024
1 parent 991ae3c commit 7f387db
Showing 1 changed file with 56 additions and 0 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/code-quality.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Test code quality

on:
push:
pull_request:
branches:
- main

jobs:
code-quality:
runs-on: ubuntu-22.04

strategy:
matrix:
python-version: [ "3.9", "3.10", "3.11", "3.12" ]

steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Workaround github issue https://github.com/actions/runner-images/issues/7192
run: sudo echo RESET grub-efi/install_devices | sudo debconf-communicate grub-pc

- name: Install pip and hatch
run: |
sudo apt-get install -y python3-pip
pip3 install hatch
- name: Cache dependencies
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-code-quality-${{ hashFiles('pyproject.toml') }}
restore-keys: |
${{ runner.os }}-code-quality-
- name: Install required system packages only for Ubuntu Linux
run: sudo apt-get install -y libsecp256k1-dev

- name: Install required Python packages
run: |
pip3 install black isort ruff mypy
- name: Black
run: black --check src tests

- name: Isort
run: isort --check src tests

- name: Ruff
run: ruff check src tests

- name: Mypy
run: mypy src tests

0 comments on commit 7f387db

Please sign in to comment.