update #11
This file contains 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://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
name: Python Test | |
on: | |
push: | |
branches: [master,dev] | |
pull_request: | |
branches: [master] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.10", "3.11", "3.12"] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install devDependence | |
run: | | |
python -m pip install --upgrade pip | |
pip install mypy pycodestyle coverage lxml types-PyYAML pydantic | |
- name: Install dependencies | |
run: | | |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
- name: Lint with pep8 | |
run: | | |
pycodestyle --max-line-length=140 --ignore=E501 --first --statistics schema_entry | |
- name: Type Hint Check | |
run: | | |
mypy --ignore-missing-imports --show-column-numbers --follow-imports=silent --check-untyped-defs --disallow-untyped-defs --no-implicit-optional --warn-unused-ignores schema_entry | |
- name: Unit Test | |
run: | | |
python -m coverage run --source=schema_entry -m unittest discover -v -s . | |
python -m coverage report |