-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #18 from bitranox/development
v1.6.0 -------- 2021-12-19: feature release - update github actions - fix "setup.py test" - fix typing
- Loading branch information
Showing
34 changed files
with
784 additions
and
371 deletions.
There are no files selected for viewing
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 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 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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
.. code-block:: bash | ||
.. code-block:: | ||
Usage: fake_winreg [OPTIONS] COMMAND [ARGS]... | ||
|
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 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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
- to install the latest release from PyPi via pip (recommended): | ||
|
||
.. code-block:: bash | ||
.. code-block:: | ||
python -m pip install --upgrade fake_winreg |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
tested on linux "bionic" with python 3.6, 3.7, 3.8, 3.9-dev, pypy3 - architectures: amd64, ppc64le, s390x, arm64 | ||
tested on recent linux with python 3.6, 3.7, 3.8, 3.9, 3.10.0, pypy-3.8 - architectures: amd64 | ||
|
||
`100% code coverage <https://codecov.io/gh/bitranox/fake_winreg>`_, flake8 style checking ,mypy static type checking ,tested under `Linux, macOS, Windows <https://travis-ci.org/bitranox/fake_winreg>`_, automatic daily builds and monitoring | ||
`100% code coverage <https://codecov.io/gh/bitranox/fake_winreg>`_, flake8 style checking ,mypy static type checking ,tested under `Linux, macOS, Windows <https://github.com/bitranox/fake_winreg/actions/workflows/python-package.yml>`_, automatic daily builds and monitoring |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,255 @@ | ||
# 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 package | ||
|
||
on: | ||
push: | ||
branches: [ master, development ] | ||
pull_request: | ||
branches: [ master, development ] | ||
release: | ||
branches: [ master, development ] | ||
# release types see : https://docs.github.com/en/actions/reference/events-that-trigger-workflows#release | ||
# he prereleased type will not trigger for pre-releases published from draft releases, but the published type will trigger. | ||
# If you want a workflow to run when stable and pre-releases publish, subscribe to published instead of released and prereleased. | ||
types: [published] | ||
|
||
schedule: | ||
# * is a special character in YAML, so you have to quote this string | ||
# | minute | hour (UTC) | day of month (1-31) | month (1-2) | day of week (0-6 or SUN-SAT) | ||
# every day at 05:40 am UTC - avoid 05:00 because of high load at the beginning of every hour | ||
- cron: '40 5 * * *' | ||
|
||
|
||
jobs: | ||
|
||
build: | ||
runs-on: ${{ matrix.os }} | ||
|
||
env: | ||
# prefix before commands - used for wine, there the prefix is "wine" | ||
cPREFIX: "" | ||
# command to launch python interpreter (it's different on macOS, there we need python3) | ||
cPYTHON: "python" | ||
# command to launch pip (it's different on macOS, there we need pip3) | ||
cPIP: "python -m pip" | ||
# switch off wine fix me messages | ||
WINEDEBUG: fixme-all | ||
|
||
# PYTEST | ||
PYTEST_DO_TESTS: "True" | ||
|
||
# FLAKE8 tests | ||
DO_FLAKE8_TESTS: "True" | ||
|
||
# MYPY tests | ||
MYPY_DO_TESTS: "True" | ||
MYPY_OPTIONS: "--follow-imports=normal --ignore-missing-imports --implicit-reexport --install-types --no-warn-unused-ignores --non-interactive --strict" | ||
MYPYPATH: "./fake_winreg/3rd_party_stubs" | ||
|
||
# coverage | ||
DO_COVERAGE: "True" | ||
DO_COVERAGE_UPLOAD_CODECOV: "True" | ||
DO_COVERAGE_UPLOAD_CODE_CLIMATE: "True" | ||
|
||
# package name | ||
PACKAGE_NAME: "fake_winreg" | ||
# the registered CLI Command | ||
CLI_COMMAND: "fake_winreg" | ||
# the source file for rst_include (rebuild rst file includes) | ||
RST_INCLUDE_SOURCE: "./.docs/README_template.rst" | ||
# the target file for rst_include (rebuild rst file includes) | ||
RST_INCLUDE_TARGET: "./README.rst" | ||
# make Code Coverage Secret available in Environment | ||
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} | ||
# make PyPi Password available in Environment | ||
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | ||
|
||
|
||
strategy: | ||
matrix: | ||
include: | ||
# https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#supported-software | ||
|
||
- os: windows-latest | ||
python-version: 3.9 | ||
env: | ||
cEXPORT: "SET" | ||
BUILD_DOCS: "False" | ||
DEPLOY_SDIST: "False" | ||
DEPLOY_WHEEL: "False" | ||
DEPLOY_TEST: "False" | ||
MYPY_DO_TESTS: "True" | ||
# Setup tests | ||
DO_SETUP_INSTALL: "True" | ||
DO_SETUP_INSTALL_TEST: "True" | ||
# Test registered CLI Command | ||
DO_CLI_TEST: "True" | ||
|
||
|
||
- os: ubuntu-latest | ||
python-version: "3.6" | ||
env: | ||
BUILD_DOCS: "False" | ||
DEPLOY_SDIST: "True" | ||
DEPLOY_WHEEL: "True" | ||
DEPLOY_TEST: "True" | ||
MYPY_DO_TESTS: "True" | ||
DO_SETUP_INSTALL: "True" | ||
DO_SETUP_INSTALL_TEST: "False" | ||
DO_CLI_TEST: "True" | ||
|
||
- os: ubuntu-latest | ||
python-version: "3.7" | ||
env: | ||
BUILD_DOCS: "False" | ||
DEPLOY_SDIST: "True" | ||
DEPLOY_WHEEL: "True" | ||
DEPLOY_TEST: "True" | ||
MYPY_DO_TESTS: "True" | ||
DO_SETUP_INSTALL: "True" | ||
DO_SETUP_INSTALL_TEST: "False" | ||
DO_CLI_TEST: "True" | ||
|
||
- os: ubuntu-latest | ||
python-version: "3.8" | ||
env: | ||
BUILD_DOCS: "False" | ||
DEPLOY_SDIST: "True" | ||
DEPLOY_WHEEL: "True" | ||
DEPLOY_TEST: "True" | ||
MYPY_DO_TESTS: "True" | ||
DO_SETUP_INSTALL: "True" | ||
DO_SETUP_INSTALL_TEST: "False" | ||
DO_CLI_TEST: "True" | ||
|
||
- os: ubuntu-latest | ||
python-version: "3.9" | ||
env: | ||
BUILD_DOCS: "False" | ||
DEPLOY_SDIST: "True" | ||
DEPLOY_WHEEL: "True" | ||
DEPLOY_TEST: "True" | ||
MYPY_DO_TESTS: "True" | ||
DO_SETUP_INSTALL: "True" | ||
DO_SETUP_INSTALL_TEST: "False" | ||
DO_CLI_TEST: "True" | ||
|
||
- os: ubuntu-latest | ||
python-version: "3.10.0" | ||
env: | ||
BUILD_DOCS: "True" | ||
DEPLOY_SDIST: "True" | ||
DEPLOY_WHEEL: "True" | ||
DEPLOY_TEST: "True" | ||
MYPY_DO_TESTS: "True" | ||
DO_SETUP_INSTALL: "True" | ||
DO_SETUP_INSTALL_TEST: "True" | ||
DO_CLI_TEST: "True" | ||
|
||
- os: ubuntu-latest | ||
python-version: "pypy-3.8" | ||
env: | ||
BUILD_DOCS: "False" | ||
DEPLOY_SDIST: "True" | ||
DEPLOY_WHEEL: "True" | ||
DEPLOY_TEST: "True" | ||
MYPY_DO_TESTS: "False" | ||
DO_SETUP_INSTALL: "True" | ||
DO_SETUP_INSTALL_TEST: "False" | ||
DO_CLI_TEST: "True" | ||
|
||
- os: macos-latest | ||
python-version: 3.9 | ||
env: | ||
cPREFIX: "" # prefix before commands - used for wine, there the prefix is "wine" | ||
cPYTHON: "python3" # command to launch python interpreter (it's different on macOS, there we need python3) | ||
cPIP: "python3 -m pip" # command to launch pip (it's different on macOS, there we need pip3) | ||
BUILD_DOCS: "False" | ||
DEPLOY_SDIST: "True" | ||
DEPLOY_WHEEL: "True" | ||
DEPLOY_TEST: "True" | ||
MYPY_DO_TESTS: "True" | ||
# Setup tests | ||
DO_SETUP_INSTALL: "True" | ||
DO_SETUP_INSTALL_TEST: "True" | ||
# Test registered CLI Command | ||
DO_CLI_TEST: "True" | ||
|
||
|
||
name: "${{ matrix.os }} Python ${{ matrix.python-version }}" | ||
|
||
steps: | ||
# see : https://github.com/actions/checkout | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Setting up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install dependencies | ||
# see: https://github.community/t/github-actions-new-bug-unable-to-create-environment-variables-based-matrix/16104/3 | ||
env: ${{ matrix.env }} # make matrix env variables accessible | ||
# lib_cicd_github install: upgrades pip, setuptools, wheel and pytest-pycodestyle | ||
run: | | ||
${{ env.cPIP }} install git+https://github.com/bitranox/lib_cicd_github.git | ||
lib_cicd_github install | ||
- name: Debug - printenv and colortest | ||
env: | ||
# make matrix env variables accessible | ||
${{ matrix.env }} | ||
shell: bash | ||
run: | | ||
# export for current step | ||
export "BRANCH=$(lib_cicd_github get_branch)" | ||
# export for subsequent steps | ||
echo "BRANCH=$BRANCH" >> $GITHUB_ENV | ||
log_util --level=SPAM "working on branch $BRANCH" | ||
log_util --level=SPAM "GITHUB_REF $GITHUB_REF" | ||
log_util --level=VERBOSE "github.base_ref: ${{ github.base_ref }}" | ||
log_util --level=VERBOSE "github.event: ${{ github.event }}" | ||
log_util --level=VERBOSE "github.event_name: ${{ github.event_name }}" | ||
log_util --level=VERBOSE "github.head_ref: ${{ github.head_ref }}" | ||
log_util --level=VERBOSE "github.job: ${{ github.job }}" | ||
log_util --level=VERBOSE "github.ref: ${{ github.ref }}" | ||
log_util --level=VERBOSE "github.repository: ${{ github.repository }}" | ||
log_util --level=VERBOSE "github.repository_owner: ${{ github.repository_owner }}" | ||
log_util --level=VERBOSE "runner.os: ${{ runner.os }}" | ||
log_util --level=VERBOSE "matrix.python-version: ${{ matrix.python-version }}" | ||
printenv | ||
log_util --colortest | ||
- name: Run Tests | ||
env: | ||
# make matrix env variables accessible | ||
${{ matrix.env }} | ||
shell: bash | ||
run: | | ||
# export for current step | ||
export "BRANCH=$(lib_cicd_github get_branch)" | ||
# export for subsequent steps | ||
echo "BRANCH=$BRANCH" >> $GITHUB_ENV | ||
# run the tests | ||
lib_cicd_github script | ||
- name: After Success | ||
env: | ||
${{matrix.env }} | ||
shell: bash | ||
continue-on-error: true | ||
run: | | ||
lib_cicd_github after_success | ||
- name: Deploy | ||
env: | ||
# see: https://docs.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions#github-context | ||
# see : https://github.com/rlespinasse/github-slug-action | ||
# make matrix env variables accessible | ||
${{matrix.env }} | ||
shell: bash | ||
run: | | ||
lib_cicd_github deploy | ||
ls -l ./dist |
Oops, something went wrong.