mirror of
https://github.com/aljazceru/breez-sdk-docs.git
synced 2025-12-17 05:44:20 +01:00
use local package for python CI
This commit is contained in:
66
.github/workflows/main.yml
vendored
66
.github/workflows/main.yml
vendored
@@ -38,7 +38,7 @@ jobs:
|
|||||||
repository: breez/breez-sdk
|
repository: breez/breez-sdk
|
||||||
ref: ${{ needs.setup.outputs.sdk-ref }}
|
ref: ${{ needs.setup.outputs.sdk-ref }}
|
||||||
package-version: ${{ needs.setup.outputs.package-version }}
|
package-version: ${{ needs.setup.outputs.package-version }}
|
||||||
packages-to-publish: '["csharp", "flutter", "golang", "react-native"]'
|
packages-to-publish: '["csharp", "flutter", "golang", "react-native", "python"]'
|
||||||
use-dummy-binaries: true
|
use-dummy-binaries: true
|
||||||
|
|
||||||
check-rust:
|
check-rust:
|
||||||
@@ -232,7 +232,43 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
go get
|
go get
|
||||||
go build .
|
go build .
|
||||||
|
|
||||||
|
check-python:
|
||||||
|
needs:
|
||||||
|
- build-packages
|
||||||
|
name: Check Python snippets
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Set up Python
|
||||||
|
uses: actions/setup-python@v4
|
||||||
|
with:
|
||||||
|
python-version: '3.8'
|
||||||
|
|
||||||
|
- name: Download archived package
|
||||||
|
uses: actions/download-artifact@v3
|
||||||
|
with:
|
||||||
|
name: python-wheel-3.8-manylinux_2_31_x86_64
|
||||||
|
path: snippets/python/packages
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
working-directory: snippets/python
|
||||||
|
run: |
|
||||||
|
python -m pip install --upgrade pip
|
||||||
|
pip install ruff
|
||||||
|
whlfile=$(ls packages | grep .whl)
|
||||||
|
pip install "packages/$whlfile"
|
||||||
|
|
||||||
|
- name: Check python formatting
|
||||||
|
working-directory: snippets/python/src
|
||||||
|
run: ruff --ignore F841 --ignore F401 --output-format=github .
|
||||||
|
|
||||||
|
- name: Check python syntax
|
||||||
|
working-directory: snippets/python
|
||||||
|
run: python3 -m compileall src
|
||||||
|
|
||||||
build:
|
build:
|
||||||
name: Build mdbook
|
name: Build mdbook
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -273,31 +309,3 @@ jobs:
|
|||||||
git add -f book
|
git add -f book
|
||||||
git commit -m "Generate documentation"
|
git commit -m "Generate documentation"
|
||||||
git push origin --force main:main-generated
|
git push origin --force main:main-generated
|
||||||
python:
|
|
||||||
name: Python
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- name: Set up Python
|
|
||||||
uses: actions/setup-python@v4
|
|
||||||
with:
|
|
||||||
python-version: '3.8'
|
|
||||||
- name: Install dependencies
|
|
||||||
run: |
|
|
||||||
python -m pip install --upgrade pip
|
|
||||||
pip install ruff
|
|
||||||
# use pypi when published.
|
|
||||||
pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple breez_sdk
|
|
||||||
|
|
||||||
- name: python-analyse with ruff
|
|
||||||
run: |
|
|
||||||
cd snippets/python_snippets/src
|
|
||||||
ruff --ignore F841 --ignore F401 --output-format=github .
|
|
||||||
|
|
||||||
- name: Test
|
|
||||||
run: |
|
|
||||||
cd snippets/python_snippets
|
|
||||||
python3 -m compileall src
|
|
||||||
|
|
||||||
continue-on-error: false
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
2. Download the wheel artifact for your platform. For linux that is `python-wheel-3.8-manylinux_2_31_x86_64`
|
2. Download the wheel artifact for your platform. For linux that is `python-wheel-3.8-manylinux_2_31_x86_64`
|
||||||
3. Unzip the artifact in the `snippets/python/packages` folder.
|
3. Unzip the artifact in the `snippets/python/packages` folder.
|
||||||
4. Run `pip install packages/{NAME_OF_.WHL_FILE}`
|
4. Run `pip install packages/{NAME_OF_.WHL_FILE}`
|
||||||
4. happy coding!
|
5. happy coding!
|
||||||
|
|
||||||
To check the syntax:
|
To check the syntax:
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user