Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated CI dropping support for old Python versions and fixing font installation issues #50

Merged
merged 5 commits into from
Aug 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 15 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: windows-latest
strategy:
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10']
python-version: ['3.9', '3.10', '3.11', '3.12']

steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -51,7 +51,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ['3.7', '3.8', '3.9', '3.10']
python-version: ['3.9', '3.10', '3.11', '3.12']

steps:
- uses: actions/checkout@v2
Expand All @@ -70,15 +70,20 @@ jobs:
if: matrix.os == 'macos-latest'
run: brew install python py3cairo pygobject3 pango

- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: 1.22

- name: Install fonts (non-Windows)
if: matrix.os != 'windows-latest'
run: |
GO111MODULE=on GOBIN=$HOME/.local/bin go get github.com/Crosse/font-install@v1.4.1
$HOME/.local/bin/font-install "https://osdn.net/frs/redir.php?m=gigenet&f=mix-mplus-ipa%2F58720%2Fmigu-1p-20130430.zip"
go install github.com/Crosse/font-install@latest
font-install "https://github.com/itouhiro/mixfont-mplus-ipa/releases/download/v2020.0307/migu-1p-20200307.zip"
shell: bash
- name: Install fonts (Windows)
if: matrix.os == 'windows-latest'
run: ./.github/scripts/install-fonts.ps1 'https://osdn.net/frs/redir.php?m=gigenet&f=mix-mplus-ipa%2F58720%2Fmigu-1p-20130430.zip'
run: ./.github/scripts/install-fonts.ps1 'https://github.com/itouhiro/mixfont-mplus-ipa/releases/download/v2020.0307/migu-1p-20200307.zip'
shell: pwsh

- name: Cache Python
Expand All @@ -104,10 +109,10 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: Set up Python ${{ matrix.python-version }}
- name: Set up Python 3.12
uses: actions/setup-python@v2
with:
python-version: 3.9
python-version: 3.12

- name: Install pypa/build
run: >-
Expand All @@ -126,11 +131,11 @@ jobs:
.

- name: Publish distribution 📦 to Test PyPI
uses: pypa/gh-action-pypi-publish@master
uses: pypa/gh-action-pypi-publish@release/v1.9
with:
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/
repository-url: https://test.pypi.org/legacy/
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@master
uses: pypa/gh-action-pypi-publish@release/v1.9
with:
password: ${{ secrets.PYPI_API_TOKEN }}
2 changes: 1 addition & 1 deletion tests/test_convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ def test_text_to_shape():

if sys.platform == "win32":
assert shape == Shape(
"m 14.938 23.422 b 13.031 22.562 11.156 22.125 9.328 22.125 7.219 22.125 6.156 22.734 6.156 23.984 6.156 24.578 6.391 25.031 6.844 25.359 7.312 25.672 8.109 25.922 9.25 26.078 11.797 26.422 13.625 27.078 14.719 28.047 15.828 29 16.375 30.328 16.375 32 16.375 33.625 15.734 34.922 14.453 35.891 13.172 36.844 11.375 37.328 9.078 37.328 6.312 37.328 3.844 36.75 1.688 35.609 l 2.547 32.234 b 4.5 33.359 6.594 33.922 8.844 33.922 10.844 33.922 11.828 33.266 11.828 31.922 11.828 31.312 11.625 30.844 11.219 30.516 10.797 30.203 10 29.938 8.812 29.766 6.234 29.328 4.422 28.641 3.375 27.734 2.297 26.797 1.75 25.516 1.75 23.906 1.781 22.312 2.406 21.047 3.641 20.125 4.891 19.203 6.703 18.75 9.078 18.75 11.469 18.75 13.703 19.188 15.797 20.062 l 14.938 23.422 m 24.672 19.094 l 24.672 29.766 b 24.672 31.297 24.875 32.344 25.312 32.906 25.734 33.469 26.453 33.75 27.484 33.75 28.5 33.75 29.422 33.25 30.25 32.219 31.062 31.203 31.484 30 31.484 28.625 l 31.484 19.094 35.953 19.094 35.953 36.984 31.797 36.984 31.688 34.469 31.625 34.469 b 30.938 35.375 30.078 36.062 29.078 36.578 28.062 37.078 27.016 37.328 25.938 37.328 24 37.328 22.562 36.781 21.641 35.656 20.719 34.547 20.266 32.734 20.266 30.203 l 20.266 19.094 24.672 19.094"
"m 14.938 23.422 b 13 22.562 11.141 22.125 9.328 22.125 7.234 22.141 6.188 22.766 6.156 23.984 6.156 24.828 6.688 25.422 7.734 25.766 8.156 25.891 8.656 25.984 9.25 26.078 12.922 26.609 15.156 27.812 15.969 29.688 16.234 30.359 16.375 31.125 16.375 32 16.375 34.25 15.266 35.797 13.047 36.672 11.922 37.109 10.594 37.328 9.078 37.328 6.312 37.328 3.844 36.75 1.688 35.609 l 2.547 32.234 b 4.5 33.359 6.594 33.922 8.844 33.922 10.812 33.906 11.812 33.234 11.828 31.922 11.828 31.141 11.484 30.594 10.766 30.281 10.312 30.078 9.656 29.906 8.812 29.766 5.094 29.172 2.859 27.906 2.094 25.969 1.875 25.359 1.75 24.672 1.75 23.906 1.75 21.656 2.906 20.141 5.234 19.328 6.328 18.953 7.609 18.75 9.078 18.75 11.484 18.75 13.734 19.188 15.797 20.062 l 14.938 23.422 m 24.672 19.094 l 24.672 29.766 b 24.672 31.797 25.109 33.047 26.016 33.469 26.406 33.656 26.891 33.75 27.484 33.75 28.641 33.75 29.641 33.141 30.484 31.891 31.172 30.906 31.516 29.812 31.516 28.625 l 31.516 19.094 35.984 19.094 35.984 36.984 31.797 36.984 31.688 34.469 31.625 34.469 b 30.359 36.125 28.719 37.062 26.703 37.297 26.422 37.312 26.172 37.328 25.938 37.328 23.188 37.328 21.453 36.188 20.75 33.891 20.422 32.906 20.266 31.672 20.266 30.203 l 20.266 19.094 24.672 19.094"
)
elif sys.platform == "linux" or sys.platform == "darwin":
i = 0
Expand Down
Loading