-
Notifications
You must be signed in to change notification settings - Fork 5
49 lines (39 loc) · 1.24 KB
/
code-quality.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
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 mypy ruff black
- name: Test with black
run: |
black --check aleph_message
- name: Test with ruff
run: |
ruff aleph_message
- name: Test with mypy
run: |
mypy --install-types --non-interactive
mypy aleph_message --check-untyped-defs