-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7012170
commit 765023b
Showing
1 changed file
with
48 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: Test code quality | ||
|
||
on: | ||
push: | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
code-quality: | ||
runs-on: ubuntu-22.04 | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- 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: Cache dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.cache/pip | ||
key: ${{ runner.os }}-code-quality-${{ hashFiles('setup.cfg', 'setup.py') }} | ||
restore-keys: | | ||
${{ runner.os }}-code-quality- | ||
- name: Install required system packages only for Ubuntu Linux | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get -y upgrade | ||
sudo apt-get install -y libsecp256k1-dev | ||
- name: Install required Python packages | ||
run: | | ||
python3 -m pip install -e . | ||
python3 -m pip install black isort mypy ruff | ||
- name: Test with Black | ||
run: | | ||
black --check ./aleph_message | ||
- name: Test with isort | ||
run: | | ||
isort --check-only ./aleph_message | ||
- name: Test with ruff | ||
run: | | ||
ruff ./aleph_message |