HH-185389 add pytest base class #125
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
--- | |
name: Python package | |
'on': | |
pull_request: | |
branches: ["master"] | |
push: | |
branches: ["master"] # cache from master shared with child branches | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab | |
- name: Install python | |
uses: actions/setup-python@v4 | |
id: pinstall | |
with: | |
python-version-file: pyproject.toml | |
cache: pip | |
cache-dependency-path: | | |
poetry.lock | |
- name: Install poetry | |
run: | | |
python -m pip install poetry | |
- name: Install package | |
run: | | |
poetry install | |
- name: Test with pytest | |
run: | | |
python -m poetry run pytest | |
# true if cache-hit occured on the primary key | |
- run: echo '${{ steps.pinstall.outputs.cache-hit }}' | |
# - name: Lint with flake8 | |
# run: | | |
# # stop the build if there are Python syntax errors or undefined names | |
# # flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | |
# # exit-zero treats all errors as warnings | |
# flake8 . --count --exit-zero --max-complexity=10 --statistics |