Skip to content

Commit

Permalink
Update CI.
Browse files Browse the repository at this point in the history
  • Loading branch information
john-parton committed May 27, 2024
1 parent bcc58cf commit 18d702d
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 24 deletions.
38 changes: 18 additions & 20 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This file is autogenerated by maturin v1.3.0
# This file is autogenerated by maturin v1.5.0
# To update, run
#
# maturin generate-ci github
Expand All @@ -25,8 +25,8 @@ jobs:
matrix:
target: [x86_64, x86, aarch64, armv7, s390x, ppc64le]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Build wheels
Expand All @@ -37,9 +37,9 @@ jobs:
sccache: "true"
manylinux: auto
- name: Upload wheels
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: wheels
name: wheels-linux-${{ matrix.target }}
path: dist

windows:
Expand All @@ -48,8 +48,8 @@ jobs:
matrix:
target: [x64, x86]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.10"
architecture: ${{ matrix.target }}
Expand All @@ -60,9 +60,9 @@ jobs:
args: --release --out dist --find-interpreter
sccache: "true"
- name: Upload wheels
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: wheels
name: wheels-windows-${{ matrix.target }}
path: dist

macos:
Expand All @@ -71,8 +71,8 @@ jobs:
matrix:
target: [x86_64, aarch64]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Build wheels
Expand All @@ -82,24 +82,24 @@ jobs:
args: --release --out dist --find-interpreter
sccache: "true"
- name: Upload wheels
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: wheels
name: wheels-macos-${{ matrix.target }}
path: dist

sdist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Build sdist
uses: PyO3/maturin-action@v1
with:
command: sdist
args: --out dist
- name: Upload sdist
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: wheels
name: wheels-sdist
path: dist

release:
Expand All @@ -108,13 +108,11 @@ jobs:
if: "startsWith(github.ref, 'refs/tags/')"
needs: [linux, windows, macos, sdist]
steps:
- uses: actions/download-artifact@v3
with:
name: wheels
- uses: actions/download-artifact@v4
- name: Publish to PyPI
uses: PyO3/maturin-action@v1
env:
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
with:
command: upload
args: --non-interactive --skip-existing *
args: --non-interactive --skip-existing wheels-*/*
11 changes: 7 additions & 4 deletions tests/test_decode.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,13 @@ def test_decode() -> None:
assert raw.decode(detect(raw)) == "Jakby rêka Boga"


@pytest.mark.parametrize(("text", "encoding", "detected_encoding"), [
("สวัสดี, โลก", "cp874", "cp874"),
("员会 ⛆", "gb18030", "gb18030"),
])
@pytest.mark.parametrize(
("text", "encoding", "detected_encoding"),
[
("สวัสดี, โลก", "cp874", "cp874"),
("员会 ⛆", "gb18030", "gb18030"),
],
)
def test_returns_python_supported_names(
text: str,
encoding: str,
Expand Down

0 comments on commit 18d702d

Please sign in to comment.