FEAT: improve on workflows and makefile (#276)

* FEAT: improve on workflows and makefile

* update to poetry 1.5.1

* caching needs newer python task

quickfix
This commit is contained in:
dni ⚡
2023-07-18 00:13:39 +02:00
committed by GitHub
parent 8a9b0662a1
commit c7dd582b56
5 changed files with 54 additions and 51 deletions

View File

@@ -1,10 +1,6 @@
name: checks
on:
push:
branches: [main]
pull_request:
branches: [main]
on: [push, pull_request]
jobs:
formatting:
@@ -12,41 +8,43 @@ jobs:
strategy:
matrix:
python-version: ["3.9"]
poetry-version: ["1.3.1"]
poetry-version: ["1.5.1"]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Set up Poetry ${{ matrix.poetry-version }}
uses: abatilo/actions-poetry@v2
with:
poetry-version: ${{ matrix.poetry-version }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: "poetry"
- name: Install packages
run: poetry install --with dev
run: poetry install
- name: Check black
run: poetry run black --check .
run: make black-check
- name: Check isort
run: poetry run isort --profile black --check-only .
run: make isort-check
linting:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9"]
poetry-version: ["1.3.1"]
poetry-version: ["1.5.1"]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Set up Poetry ${{ matrix.poetry-version }}
uses: abatilo/actions-poetry@v2
with:
poetry-version: ${{ matrix.poetry-version }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: "poetry"
- name: Install packages
run: poetry install --with dev
run: poetry install
- name: Setup mypy
run: yes | poetry run mypy cashu --install-types || true
- name: Run mypy

View File

@@ -9,32 +9,33 @@ jobs:
matrix:
os: [ubuntu-latest]
python-version: ["3.9.13"]
poetry-version: ["1.4.2"]
poetry-version: ["1.5.1"]
steps:
- name: Checkout repository and submodules
uses: actions/checkout@v2
with:
submodules: recursive
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Set up Poetry ${{ matrix.poetry-version }}
uses: abatilo/actions-poetry@v2
with:
poetry-version: ${{ matrix.poetry-version }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: "poetry"
- name: Install dependencies
run: |
poetry install --with dev
poetry install
shell: bash
- name: Run tests
env:
LIGHTNING: False
LIGHTNING: false
WALLET_NAME: test_wallet
MINT_HOST: localhost
MINT_PORT: 3337
TOR: False
TOR: false
run: |
poetry run pytest tests --cov-report xml --cov cashu
make test
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3