mirror of https://github.com/dethos/inlinehashes
Fix and extend workflows (#1)
* run pytest in the poetry environment * add check jobs: black and mypymain
parent
9fea295f24
commit
b779c2f436
@ -0,0 +1,47 @@ |
||||
name: Check source |
||||
|
||||
on: |
||||
push: |
||||
branches: [main] |
||||
pull_request: |
||||
branches: [main] |
||||
|
||||
permissions: |
||||
contents: read |
||||
|
||||
jobs: |
||||
format: |
||||
runs-on: ubuntu-latest |
||||
|
||||
steps: |
||||
- uses: actions/checkout@v3 |
||||
- name: Set up Python 3.9 |
||||
uses: actions/setup-python@v3 |
||||
with: |
||||
python-version: "3.9" |
||||
- name: Install dependencies |
||||
run: | |
||||
python -m pip install --upgrade pip |
||||
pip install poetry |
||||
poetry install |
||||
- name: Check format with black |
||||
run: | |
||||
poetry run black --check . |
||||
|
||||
typing: |
||||
runs-on: ubuntu-latest |
||||
|
||||
steps: |
||||
- uses: actions/checkout@v3 |
||||
- name: Set up Python 3.9 |
||||
uses: actions/setup-python@v3 |
||||
with: |
||||
python-version: "3.9" |
||||
- name: Install dependencies |
||||
run: | |
||||
python -m pip install --upgrade pip |
||||
pip install poetry |
||||
poetry install |
||||
- name: Check typing with mypy |
||||
run: | |
||||
poetry run mypy inlinehashes/ |
Loading…
Reference in new issue