mirror of
https://github.com/openziti/zrok.git
synced 2025-04-11 12:58:24 +02:00
lint the py sdk
This commit is contained in:
parent
5ea81c4959
commit
626ebb1e2d
4
.flake8
4
.flake8
@ -1,5 +1,5 @@
|
|||||||
[flake8]
|
[flake8]
|
||||||
max-line-length = 120
|
max-line-length = 120
|
||||||
exclude =
|
exclude =
|
||||||
./build/**
|
sdk/python/src/zrok_api/*
|
||||||
|
sdk/python/src/test/*
|
||||||
|
40
.github/workflows/ci-build.yml
vendored
40
.github/workflows/ci-build.yml
vendored
@ -61,19 +61,6 @@ jobs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
run: go test -v ./...
|
run: go test -v ./...
|
||||||
|
|
||||||
- name: setup python
|
|
||||||
uses: actions/setup-python@v3
|
|
||||||
with:
|
|
||||||
python-version: '3.13'
|
|
||||||
|
|
||||||
- name: python deps
|
|
||||||
shell: bash
|
|
||||||
run: python -m pip install -U pip flake8
|
|
||||||
|
|
||||||
- name: python lint
|
|
||||||
shell: bash
|
|
||||||
run: flake8 sdk/python/src
|
|
||||||
|
|
||||||
- name: solve GOBIN
|
- name: solve GOBIN
|
||||||
id: solve_go_bin
|
id: solve_go_bin
|
||||||
shell: bash
|
shell: bash
|
||||||
@ -89,14 +76,14 @@ jobs:
|
|||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
pytest:
|
pytest:
|
||||||
|
name: Test the Python SDK
|
||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
working-directory: sdk/python/src
|
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
python-version: ["3.10", "3.11", "3.12", "3.13"]
|
python-version: ["3.10", "3.11", "3.12", "3.13"]
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
working-directory: sdk/python
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
@ -114,10 +101,10 @@ jobs:
|
|||||||
set -o xtrace
|
set -o xtrace
|
||||||
|
|
||||||
python -m pip install --upgrade pip
|
python -m pip install --upgrade pip
|
||||||
pip install -r requirements.txt
|
pip install -r src/requirements.txt
|
||||||
pip install -r test-requirements.txt
|
pip install -r src/test-requirements.txt
|
||||||
pip install -r build-requirements.txt
|
pip install -r src/build-requirements.txt
|
||||||
pip install -e "$PWD"
|
pip install -e src/
|
||||||
|
|
||||||
- name: Test with pytest
|
- name: Test with pytest
|
||||||
shell: bash
|
shell: bash
|
||||||
@ -126,7 +113,16 @@ jobs:
|
|||||||
set -o pipefail
|
set -o pipefail
|
||||||
set -o xtrace
|
set -o xtrace
|
||||||
|
|
||||||
pytest --cov=zrok_api --verbose
|
pytest --cov=zrok_api --verbose src/
|
||||||
|
|
||||||
|
- name: Lint the Python SDK
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
|
||||||
|
set -o pipefail
|
||||||
|
set -o xtrace
|
||||||
|
|
||||||
|
flake8 .
|
||||||
|
|
||||||
# build a release candidate container image for branches named "main" or like "v*"
|
# build a release candidate container image for branches named "main" or like "v*"
|
||||||
rc-container-build:
|
rc-container-build:
|
||||||
|
Loading…
Reference in New Issue
Block a user