Updates docs and tests. #53
Workflow file for this run
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
# | |
# K2HR3 OpenStack Notification Listener | |
# | |
# Copyright 2018 Yahoo Japan Corporation | |
# | |
# K2HR3 is K2hdkc based Resource and Roles and policy Rules, gathers | |
# common management information for the cloud. | |
# K2HR3 can dynamically manage information as "who", "what", "operate". | |
# These are stored as roles, resources, policies in K2hdkc, and the | |
# client system can dynamically read and modify these information. | |
# | |
# For the full copyright and license information, please view | |
# the licenses file that was distributed with this source code. | |
# | |
# AUTHOR: Hirotaka Wakabayashi | |
# CREATE: Tue Sep 11 2018 | |
# REVISION: | |
# | |
# | |
name: Python package | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
release: | |
types: [published] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
environment: | |
name: pypi | |
url: https://pypi.org/p/k2hr3-osnl | |
permissions: | |
id-token: write | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.12", "3.11", "3.10", "3.9"] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
architecture: "x64" | |
- name: Install dependencies | |
run: | | |
make init | |
shell: sh | |
- name: Install dependencies in GHA | |
run: | | |
python -m pip install --upgrade pip | |
pipenv install --deploy --dev | |
- name: Lint with pylint | |
run: | | |
pipenv run flake8 src/k2hr3_osnl | |
pipenv run mypy src/k2hr3_osnl | |
pipenv run pylint src/k2hr3_osnl | |
pipenv run python3 setup.py checkdocs | |
shell: sh | |
- name: Test with unittest | |
run: | | |
pipenv run python3 -m unittest discover src | |
shell: sh | |
- name: Install dependencies for upload pypi package | |
if: startsWith(github.ref, 'refs/tags') | |
run: | | |
python -m pip install --upgrade pip | |
pip install build | |
- name: Build package | |
if: startsWith(github.ref, 'refs/tags') | |
run: python -m build | |
- name: Publish distribution to PyPI | |
if: ${{ matrix.python-version == '3.12' && startsWith(github.ref, 'refs/tags') }} | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
# | |
# Local variables: | |
# tab-width: 4 | |
# c-basic-offset: 4 | |
# End: | |
# vim600: expandtab sw=4 ts=4 fdm=marker | |
# vim<600: expandtab sw=4 ts=4 | |
# |