-
Notifications
You must be signed in to change notification settings - Fork 46
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 #153 from Erotemic/dev/1.3.5
Bump to 1.3.5
- Loading branch information
Showing
92 changed files
with
2,165 additions
and
856 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,9 +21,9 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout source | ||
uses: actions/checkout@v4 | ||
uses: actions/checkout@v4.1.1 | ||
- name: Set up Python 3.12 for linting | ||
uses: actions/setup-python@v4.7.1 | ||
uses: actions/setup-python@v5.0.0 | ||
with: | ||
python-version: '3.12' | ||
- name: Install dependencies | ||
|
@@ -48,9 +48,9 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout source | ||
uses: actions/checkout@v4 | ||
uses: actions/checkout@v4.1.1 | ||
- name: Set up Python 3.12 | ||
uses: actions/setup-python@v4.7.1 | ||
uses: actions/setup-python@v5.0.0 | ||
with: | ||
python-version: '3.12' | ||
- name: Upgrade pip | ||
|
@@ -66,7 +66,7 @@ jobs: | |
python -m build --sdist --outdir wheelhouse | ||
- name: Install sdist | ||
run: |- | ||
ls -al ./wheelhouse | ||
ls -al wheelhouse | ||
pip install --prefer-binary wheelhouse/ubelt*.tar.gz -v | ||
- name: Test minimal loose sdist | ||
run: |- | ||
|
@@ -80,7 +80,7 @@ jobs: | |
# Get path to installed package | ||
MOD_DPATH=$(python -c "import ubelt, os; print(os.path.dirname(ubelt.__file__))") | ||
echo "MOD_DPATH = $MOD_DPATH" | ||
python -m pytest --verbose --cov={self.mod_name} $MOD_DPATH ../tests | ||
python -m pytest --verbose --cov=ubelt $MOD_DPATH ../tests | ||
cd .. | ||
- name: Test full loose sdist | ||
run: |- | ||
|
@@ -95,13 +95,13 @@ jobs: | |
# Get path to installed package | ||
MOD_DPATH=$(python -c "import ubelt, os; print(os.path.dirname(ubelt.__file__))") | ||
echo "MOD_DPATH = $MOD_DPATH" | ||
python -m pytest --verbose --cov={self.mod_name} $MOD_DPATH ../tests | ||
python -m pytest --verbose --cov=ubelt $MOD_DPATH ../tests | ||
cd .. | ||
- name: Upload sdist artifact | ||
uses: actions/upload-artifact@v3 | ||
- uses: actions/upload-artifact@v3.1.3 | ||
name: Upload sdist artifact | ||
with: | ||
name: wheels | ||
path: ./wheelhouse/*.tar.gz | ||
name: sdist_wheels | ||
path: wheelhouse/*.tar.gz | ||
build_purepy_wheels: | ||
## | ||
# Download and test the pure-python wheels that were build in the | ||
|
@@ -110,6 +110,7 @@ jobs: | |
name: ${{ matrix.python-version }} on ${{ matrix.os }}, arch=${{ matrix.arch }} with ${{ matrix.install-extras }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: | ||
- ubuntu-latest | ||
|
@@ -119,14 +120,14 @@ jobs: | |
- auto | ||
steps: | ||
- name: Checkout source | ||
uses: actions/checkout@v4 | ||
uses: actions/checkout@v4.1.1 | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
if: runner.os == 'Linux' && matrix.arch != 'auto' | ||
with: | ||
platforms: all | ||
- name: Setup Python | ||
uses: actions/setup-python@v4.7.1 | ||
uses: actions/setup-python@v5.0.0 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Build pure wheel | ||
|
@@ -138,7 +139,7 @@ jobs: | |
- name: Show built files | ||
shell: bash | ||
run: ls -la wheelhouse | ||
- uses: actions/upload-artifact@v3 | ||
- uses: actions/upload-artifact@v3.1.3 | ||
name: Upload wheels artifact | ||
with: | ||
name: wheels | ||
|
@@ -149,6 +150,7 @@ jobs: | |
needs: | ||
- build_purepy_wheels | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
# Xcookie generates an explicit list of environments that will be used | ||
# for testing instead of using the more concise matrix notation. | ||
|
@@ -295,7 +297,7 @@ jobs: | |
arch: auto | ||
steps: | ||
- name: Checkout source | ||
uses: actions/checkout@v4 | ||
uses: actions/checkout@v4.1.1 | ||
- name: Enable MSVC 64bit | ||
uses: ilammy/msvc-dev-cmd@v1 | ||
if: matrix.os == 'windows-latest' | ||
|
@@ -305,10 +307,10 @@ jobs: | |
with: | ||
platforms: all | ||
- name: Setup Python | ||
uses: actions/setup-python@v4.7.1 | ||
uses: actions/setup-python@v5.0.0 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- uses: actions/download-artifact@v3 | ||
- uses: actions/download-artifact@v2.1.1 | ||
name: Download wheels | ||
with: | ||
name: wheels | ||
|
@@ -342,14 +344,15 @@ jobs: | |
ls -altr | ||
# Get the path to the installed package and run the tests | ||
export MOD_DPATH=$(python -c "import ubelt, os; print(os.path.dirname(ubelt.__file__))") | ||
export MOD_NAME=ubelt | ||
echo " | ||
--- | ||
MOD_DPATH = $MOD_DPATH | ||
--- | ||
running the pytest command inside the workspace | ||
--- | ||
" | ||
python -m pytest --verbose -p pytester -p no:doctest --xdoctest --cov-config ../pyproject.toml --cov-report term --cov="ubelt" "$MOD_DPATH" ../tests | ||
python -m pytest --verbose -p pytester -p no:doctest --xdoctest --cov-config ../pyproject.toml --cov-report term --durations=100 --cov="$MOD_NAME" "$MOD_DPATH" ../tests | ||
echo "pytest command finished, moving the coverage file to the repo root" | ||
ls -al | ||
# Move coverage file to a new name | ||
|
@@ -372,10 +375,11 @@ jobs: | |
echo '### The cwd should now have a coverage.xml' | ||
ls -altr | ||
pwd | ||
- uses: codecov/codecov-action@v3 | ||
- uses: codecov/codecov-action@v4.0.1 | ||
name: Codecov Upload | ||
with: | ||
file: ./coverage.xml | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
test_deploy: | ||
name: Uploading Test to PyPi | ||
runs-on: ubuntu-latest | ||
|
@@ -386,12 +390,17 @@ jobs: | |
- test_purepy_wheels | ||
steps: | ||
- name: Checkout source | ||
uses: actions/checkout@v4 | ||
- uses: actions/download-artifact@v3 | ||
name: Download wheels and sdist | ||
uses: actions/checkout@v4.1.1 | ||
- uses: actions/download-artifact@v2.1.1 | ||
name: Download wheels | ||
with: | ||
name: wheels | ||
path: wheelhouse | ||
- uses: actions/[email protected] | ||
name: Download sdist | ||
with: | ||
name: sdist_wheels | ||
path: wheelhouse | ||
- name: Show files to upload | ||
shell: bash | ||
run: ls -la wheelhouse | ||
|
@@ -419,7 +428,33 @@ jobs: | |
pip install urllib3 requests[security] twine | ||
GPG_KEYID=$(cat dev/public_gpg_key) | ||
echo "GPG_KEYID = '$GPG_KEYID'" | ||
DO_GPG=True GPG_KEYID=$GPG_KEYID TWINE_REPOSITORY_URL=${TWINE_REPOSITORY_URL} TWINE_PASSWORD=$TWINE_PASSWORD TWINE_USERNAME=$TWINE_USERNAME GPG_EXECUTABLE=$GPG_EXECUTABLE DO_UPLOAD=True DO_TAG=False ./publish.sh | ||
GPG_SIGN_CMD="$GPG_EXECUTABLE --batch --yes --detach-sign --armor --local-user $GPG_KEYID" | ||
WHEEL_PATHS=(wheelhouse/*.whl wheelhouse/*.tar.gz) | ||
WHEEL_PATHS_STR=$(printf '"%s" ' "${WHEEL_PATHS[@]}") | ||
echo "$WHEEL_PATHS_STR" | ||
for WHEEL_PATH in "${WHEEL_PATHS[@]}" | ||
do | ||
echo "------" | ||
echo "WHEEL_PATH = $WHEEL_PATH" | ||
$GPG_SIGN_CMD --output $WHEEL_PATH.asc $WHEEL_PATH | ||
$GPG_EXECUTABLE --verify $WHEEL_PATH.asc $WHEEL_PATH || echo "hack, the first run of gpg very fails" | ||
$GPG_EXECUTABLE --verify $WHEEL_PATH.asc $WHEEL_PATH | ||
done | ||
ls -la wheelhouse | ||
pip install opentimestamps-client | ||
ots stamp wheelhouse/*.whl wheelhouse/*.tar.gz wheelhouse/*.asc | ||
ls -la wheelhouse | ||
twine upload --username __token__ --password "$TWINE_PASSWORD" --repository-url "$TWINE_REPOSITORY_URL" wheelhouse/*.whl wheelhouse/*.tar.gz --skip-existing --verbose || { echo "failed to twine upload" ; exit 1; } | ||
- uses: actions/[email protected] | ||
name: Upload deploy artifacts | ||
with: | ||
name: deploy_artifacts | ||
path: |- | ||
wheelhouse/*.whl | ||
wheelhouse/*.zip | ||
wheelhouse/*.tar.gz | ||
wheelhouse/*.asc | ||
wheelhouse/*.ots | ||
live_deploy: | ||
name: Uploading Live to PyPi | ||
runs-on: ubuntu-latest | ||
|
@@ -430,12 +465,17 @@ jobs: | |
- test_purepy_wheels | ||
steps: | ||
- name: Checkout source | ||
uses: actions/checkout@v4 | ||
- uses: actions/download-artifact@v3 | ||
name: Download wheels and sdist | ||
uses: actions/checkout@v4.1.1 | ||
- uses: actions/download-artifact@v2.1.1 | ||
name: Download wheels | ||
with: | ||
name: wheels | ||
path: wheelhouse | ||
- uses: actions/[email protected] | ||
name: Download sdist | ||
with: | ||
name: sdist_wheels | ||
path: wheelhouse | ||
- name: Show files to upload | ||
shell: bash | ||
run: ls -la wheelhouse | ||
|
@@ -463,7 +503,71 @@ jobs: | |
pip install urllib3 requests[security] twine | ||
GPG_KEYID=$(cat dev/public_gpg_key) | ||
echo "GPG_KEYID = '$GPG_KEYID'" | ||
DO_GPG=True GPG_KEYID=$GPG_KEYID TWINE_REPOSITORY_URL=${TWINE_REPOSITORY_URL} TWINE_PASSWORD=$TWINE_PASSWORD TWINE_USERNAME=$TWINE_USERNAME GPG_EXECUTABLE=$GPG_EXECUTABLE DO_UPLOAD=True DO_TAG=False ./publish.sh | ||
GPG_SIGN_CMD="$GPG_EXECUTABLE --batch --yes --detach-sign --armor --local-user $GPG_KEYID" | ||
WHEEL_PATHS=(wheelhouse/*.whl wheelhouse/*.tar.gz) | ||
WHEEL_PATHS_STR=$(printf '"%s" ' "${WHEEL_PATHS[@]}") | ||
echo "$WHEEL_PATHS_STR" | ||
for WHEEL_PATH in "${WHEEL_PATHS[@]}" | ||
do | ||
echo "------" | ||
echo "WHEEL_PATH = $WHEEL_PATH" | ||
$GPG_SIGN_CMD --output $WHEEL_PATH.asc $WHEEL_PATH | ||
$GPG_EXECUTABLE --verify $WHEEL_PATH.asc $WHEEL_PATH || echo "hack, the first run of gpg very fails" | ||
$GPG_EXECUTABLE --verify $WHEEL_PATH.asc $WHEEL_PATH | ||
done | ||
ls -la wheelhouse | ||
pip install opentimestamps-client | ||
ots stamp wheelhouse/*.whl wheelhouse/*.tar.gz wheelhouse/*.asc | ||
ls -la wheelhouse | ||
twine upload --username __token__ --password "$TWINE_PASSWORD" --repository-url "$TWINE_REPOSITORY_URL" wheelhouse/*.whl wheelhouse/*.tar.gz --skip-existing --verbose || { echo "failed to twine upload" ; exit 1; } | ||
- uses: actions/[email protected] | ||
name: Upload deploy artifacts | ||
with: | ||
name: deploy_artifacts | ||
path: |- | ||
wheelhouse/*.whl | ||
wheelhouse/*.zip | ||
wheelhouse/*.tar.gz | ||
wheelhouse/*.asc | ||
wheelhouse/*.ots | ||
release: | ||
name: Create Github Release | ||
if: github.event_name == 'push' && (startsWith(github.event.ref, 'refs/tags') || startsWith(github.event.ref, 'refs/heads/release')) | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
needs: | ||
- live_deploy | ||
steps: | ||
- name: Checkout source | ||
uses: actions/[email protected] | ||
- uses: actions/[email protected] | ||
name: Download artifacts | ||
with: | ||
name: deploy_artifacts | ||
path: wheelhouse | ||
- name: Show files to release | ||
shell: bash | ||
run: ls -la wheelhouse | ||
- run: 'echo "Automatic Release Notes. TODO: improve" > ${{ github.workspace }}-CHANGELOG.txt' | ||
- uses: softprops/action-gh-release@v1 | ||
name: Create Release | ||
id: create_release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
body_path: ${{ github.workspace }}-CHANGELOG.txt | ||
tag_name: ${{ github.ref }} | ||
release_name: Release ${{ github.ref }} | ||
body: Automatic Release | ||
draft: true | ||
prerelease: false | ||
files: |- | ||
wheelhouse/*.whl | ||
wheelhouse/*.asc | ||
wheelhouse/*.ots | ||
wheelhouse/*.zip | ||
wheelhouse/*.tar.gz | ||
### | ||
|
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.