fix(py):adjust python init method with default value #41
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python | |
name: Python package test | |
on: | |
push: | |
branches: | |
- feature/py* | |
pull_request: | |
branches: | |
- feature/py* | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
# python-version: ["3.7","3.8"] | |
python-version: ["3.8","3.9", "3.10", "3.11","3.12"] | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup PDM | |
uses: pdm-project/setup-pdm@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: true | |
cache-dependency-path: './py/pdm.lock' | |
- name: Install dependencies | |
run: | | |
cd py | |
pdm install | |
- name: Lint with flake8 | |
run: | | |
cd py | |
pdm run flake8 . --select=E9,F63,F7,F82 --show-source | |
pdm run flake8 . --exit-zero | |
- name: Test with pytest | |
run: | | |
cd py | |
pdm run python -m unittest discover |