-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Start verifying the code with the usage of Python 3.9 and Python 3.10 (…
…#85) * Declare the current owners of the code the way GitHub will understand * Name the GitHub Workflow files more directly (without using verbs) * Improve naming of the jobs declared in GitHub Workflow files * Run flake8/mypy/pylint in separate steps to increase their visibility * Checkout the repository using the 4th version of the actions tool * Set up the Python interpreter with the usage of the dedicated tool * Enable caching of the dependencies to avoid downloading them each run * Avoid installing the make command already available in Ubuntu * Replace the hardcoded Python version with the strategy matrix * Always check pull requests using multiple Python versions (>=3.8) * Remove the names of steps to simplify the GitHub Workflow files * Disable the ability to run publishing the package to PyPI manually * Improve checking whether the version was updated before merging * Synchronize the repository files with their latest available version * Create a dedicated section for the packaging-related commands * Update pip-tools to the latest available version * Prepare the dedicated file with requirements for the deployment job * Reimplement the process of publishing to use the correct commands * Update the list of classifiers describing the Lambdalizator library * Update the list of badges visible in the main documentation * Upgrade the version of Lambdalizator to publish the provided changes * Always strip the whitespaces while retrieving the library version
- Loading branch information
1 parent
9241851
commit 6fb335a
Showing
16 changed files
with
214 additions
and
120 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
Validating CODEOWNERS rules …
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 +1 @@ | ||
* pdyba songofroland grzegorzpro | ||
* @pdyba @redlickigrzegorz |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,63 @@ | ||
name: Check pull request | ||
|
||
on: | ||
pull_request: | ||
types: [opened, edited, reopened, synchronize] | ||
|
||
jobs: | ||
code_quality: | ||
name: Check code quality | ||
|
||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.8", "3.9", "3.10"] # TODO: Support newer versions | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
cache: "pip" | ||
- run: make install-dev | ||
- run: make black-check | ||
- run: make isort-check | ||
- run: make flake8 | ||
- run: make mypy | ||
- run: make pylint | ||
|
||
unit_tests: | ||
name: Run unit tests | ||
|
||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.8", "3.9", "3.10"] # TODO: Support newer versions | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
cache: "pip" | ||
- run: make install-dev | ||
- run: make test | ||
|
||
version_check: | ||
name: Check version | ||
|
||
runs-on: ubuntu-latest | ||
|
||
if: ${{ github.base_ref == 'master' }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Check whether the version was updated | ||
run: | | ||
PUBLISHED_VERSION=$(curl --silent https://pypi.org/pypi/lbz/json | jq -r '.info.version') | ||
ACTUAL_VERSION=$(cat version) | ||
if [ "$PUBLISHED_VERSION" == "$ACTUAL_VERSION" ]; then | ||
echo "Update the Lambdalizator version before merging!" | ||
exit 1 | ||
fi |
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,25 @@ | ||
name: Publish to PyPI | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
pypi: | ||
name: Publish to PyPI | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.8" | ||
cache: "pip" | ||
- run: make build-nocache | ||
- run: pip install -r requirements-deploy.txt | ||
- run: python -m twine upload --verbose dist/* | ||
env: | ||
TWINE_USERNAME: __token__ | ||
TWINE_PASSWORD: ${{ secrets.PYPI }} |
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
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 @@ | ||
twine |
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,62 @@ | ||
# | ||
# This file is autogenerated by pip-compile with Python 3.8 | ||
# by the following command: | ||
# | ||
# pip-compile requirements-deploy.in | ||
# | ||
certifi==2023.11.17 | ||
# via requests | ||
charset-normalizer==3.3.2 | ||
# via requests | ||
docutils==0.20.1 | ||
# via readme-renderer | ||
idna==3.6 | ||
# via requests | ||
importlib-metadata==7.0.1 | ||
# via | ||
# keyring | ||
# twine | ||
importlib-resources==6.1.1 | ||
# via keyring | ||
jaraco-classes==3.3.0 | ||
# via keyring | ||
keyring==24.3.0 | ||
# via twine | ||
markdown-it-py==3.0.0 | ||
# via rich | ||
mdurl==0.1.2 | ||
# via markdown-it-py | ||
more-itertools==10.1.0 | ||
# via jaraco-classes | ||
nh3==0.2.15 | ||
# via readme-renderer | ||
pkginfo==1.9.6 | ||
# via twine | ||
pygments==2.17.2 | ||
# via | ||
# readme-renderer | ||
# rich | ||
readme-renderer==42.0 | ||
# via twine | ||
requests==2.31.0 | ||
# via | ||
# requests-toolbelt | ||
# twine | ||
requests-toolbelt==1.0.0 | ||
# via twine | ||
rfc3986==2.0.0 | ||
# via twine | ||
rich==13.7.0 | ||
# via twine | ||
twine==4.0.2 | ||
# via -r requirements-deploy.in | ||
typing-extensions==4.9.0 | ||
# via rich | ||
urllib3==2.1.0 | ||
# via | ||
# requests | ||
# twine | ||
zipp==3.17.0 | ||
# via | ||
# importlib-metadata | ||
# importlib-resources |
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
Oops, something went wrong.