From a147cfde818090f0e5fb65507eda153e42953374 Mon Sep 17 00:00:00 2001 From: Bob Belderbos Date: Mon, 18 Nov 2024 13:36:42 +0100 Subject: [PATCH 01/10] add workflow --- .github/workflows/python-app.yml | 34 ++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/python-app.yml diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml new file mode 100644 index 0000000..2261d61 --- /dev/null +++ b/.github/workflows/python-app.yml @@ -0,0 +1,34 @@ +name: Linting and Tests + +on: + push: + branches: + - main + pull_request: + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Install uv + uses: astral-sh/setup-uv@v3 + with: + version: "0.5.2" + enable-cache: true + cache-dependency-glob: "uv.lock" + + - name: Set up Python + run: uv python install + + - name: Install the project + run: uv sync --all-extras --dev + + - name: Run linter + run: uv run ruff check --output-format=github . + + - name: Run unit tests + run: uv run pytest tests -k "not test_e2e" From a5f6c7d711a0823e4d19e7df9c4b788f385a2ca2 Mon Sep 17 00:00:00 2001 From: Bob Belderbos Date: Mon, 18 Nov 2024 13:43:06 +0100 Subject: [PATCH 02/10] add ruff --- pyproject.toml | 1 + uv.lock | 27 +++++++++++++++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index dcbe7d0..98b3861 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -25,6 +25,7 @@ dev = [ "pytest-cov>=5.0.0", "pre-commit>=4.0.1", "pytest-coverage>=0.0", + "ruff>=0.7.4", ] [project.urls] diff --git a/uv.lock b/uv.lock index bb83ca5..a2ff10b 100644 --- a/uv.lock +++ b/uv.lock @@ -181,6 +181,7 @@ dev = [ { name = "pytest" }, { name = "pytest-cov" }, { name = "pytest-coverage" }, + { name = "ruff" }, ] [package.metadata] @@ -197,6 +198,7 @@ requires-dist = [ { name = "requests", specifier = ">=2.32.3" }, { name = "requests-cache", specifier = ">=1.2.1" }, { name = "rich", specifier = ">=13.9.2" }, + { name = "ruff", marker = "extra == 'dev'", specifier = ">=0.7.4" }, { name = "typer", specifier = ">=0.12.5" }, ] @@ -565,6 +567,31 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/67/91/5474b84e505a6ccc295b2d322d90ff6aa0746745717839ee0c5fb4fdcceb/rich-13.9.2-py3-none-any.whl", hash = "sha256:8c82a3d3f8dcfe9e734771313e606b39d8247bb6b826e196f4914b333b743cf1", size = 242117 }, ] +[[package]] +name = "ruff" +version = "0.7.4" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/0b/8b/bc4e0dfa1245b07cf14300e10319b98e958a53ff074c1dd86b35253a8c2a/ruff-0.7.4.tar.gz", hash = "sha256:cd12e35031f5af6b9b93715d8c4f40360070b2041f81273d0527683d5708fce2", size = 3275547 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/e6/4b/f5094719e254829766b807dadb766841124daba75a37da83e292ae5ad12f/ruff-0.7.4-py3-none-linux_armv6l.whl", hash = "sha256:a4919925e7684a3f18e18243cd6bea7cfb8e968a6eaa8437971f681b7ec51478", size = 10447512 }, + { url = "https://files.pythonhosted.org/packages/9e/1d/3d2d2c9f601cf6044799c5349ff5267467224cefed9b35edf5f1f36486e9/ruff-0.7.4-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:cfb365c135b830778dda8c04fb7d4280ed0b984e1aec27f574445231e20d6c63", size = 10235436 }, + { url = "https://files.pythonhosted.org/packages/62/83/42a6ec6216ded30b354b13e0e9327ef75a3c147751aaf10443756cb690e9/ruff-0.7.4-py3-none-macosx_11_0_arm64.whl", hash = "sha256:63a569b36bc66fbadec5beaa539dd81e0527cb258b94e29e0531ce41bacc1f20", size = 9888936 }, + { url = "https://files.pythonhosted.org/packages/4d/26/e1e54893b13046a6ad05ee9b89ee6f71542ba250f72b4c7a7d17c3dbf73d/ruff-0.7.4-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0d06218747d361d06fd2fdac734e7fa92df36df93035db3dc2ad7aa9852cb109", size = 10697353 }, + { url = "https://files.pythonhosted.org/packages/21/24/98d2e109c4efc02bfef144ec6ea2c3e1217e7ce0cfddda8361d268dfd499/ruff-0.7.4-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:e0cea28d0944f74ebc33e9f934238f15c758841f9f5edd180b5315c203293452", size = 10228078 }, + { url = "https://files.pythonhosted.org/packages/ad/b7/964c75be9bc2945fc3172241b371197bb6d948cc69e28bc4518448c368f3/ruff-0.7.4-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:80094ecd4793c68b2571b128f91754d60f692d64bc0d7272ec9197fdd09bf9ea", size = 11264823 }, + { url = "https://files.pythonhosted.org/packages/12/8d/20abdbf705969914ce40988fe71a554a918deaab62c38ec07483e77866f6/ruff-0.7.4-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:997512325c6620d1c4c2b15db49ef59543ef9cd0f4aa8065ec2ae5103cedc7e7", size = 11951855 }, + { url = "https://files.pythonhosted.org/packages/b8/fc/6519ce58c57b4edafcdf40920b7273dfbba64fc6ebcaae7b88e4dc1bf0a8/ruff-0.7.4-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:00b4cf3a6b5fad6d1a66e7574d78956bbd09abfd6c8a997798f01f5da3d46a05", size = 11516580 }, + { url = "https://files.pythonhosted.org/packages/37/1a/5ec1844e993e376a86eb2456496831ed91b4398c434d8244f89094758940/ruff-0.7.4-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:7dbdc7d8274e1422722933d1edddfdc65b4336abf0b16dfcb9dedd6e6a517d06", size = 12692057 }, + { url = "https://files.pythonhosted.org/packages/50/90/76867152b0d3c05df29a74bb028413e90f704f0f6701c4801174ba47f959/ruff-0.7.4-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0e92dfb5f00eaedb1501b2f906ccabfd67b2355bdf117fea9719fc99ac2145bc", size = 11085137 }, + { url = "https://files.pythonhosted.org/packages/c8/eb/0a7cb6059ac3555243bd026bb21785bbc812f7bbfa95a36c101bd72b47ae/ruff-0.7.4-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:3bd726099f277d735dc38900b6a8d6cf070f80828877941983a57bca1cd92172", size = 10681243 }, + { url = "https://files.pythonhosted.org/packages/5e/76/2270719dbee0fd35780b05c08a07b7a726c3da9f67d9ae89ef21fc18e2e5/ruff-0.7.4-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:2e32829c429dd081ee5ba39aef436603e5b22335c3d3fff013cd585806a6486a", size = 10319187 }, + { url = "https://files.pythonhosted.org/packages/9f/e5/39100f72f8ba70bec1bd329efc880dea8b6c1765ea1cb9d0c1c5f18b8d7f/ruff-0.7.4-py3-none-musllinux_1_2_i686.whl", hash = "sha256:662a63b4971807623f6f90c1fb664613f67cc182dc4d991471c23c541fee62dd", size = 10803715 }, + { url = "https://files.pythonhosted.org/packages/a5/89/40e904784f305fb56850063f70a998a64ebba68796d823dde67e89a24691/ruff-0.7.4-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:876f5e09eaae3eb76814c1d3b68879891d6fde4824c015d48e7a7da4cf066a3a", size = 11162912 }, + { url = "https://files.pythonhosted.org/packages/8d/1b/dd77503b3875c51e3dbc053fd8367b845ab8b01c9ca6d0c237082732856c/ruff-0.7.4-py3-none-win32.whl", hash = "sha256:75c53f54904be42dd52a548728a5b572344b50d9b2873d13a3f8c5e3b91f5cac", size = 8702767 }, + { url = "https://files.pythonhosted.org/packages/63/76/253ddc3e89e70165bba952ecca424b980b8d3c2598ceb4fc47904f424953/ruff-0.7.4-py3-none-win_amd64.whl", hash = "sha256:745775c7b39f914238ed1f1b0bebed0b9155a17cd8bc0b08d3c87e4703b990d6", size = 9497534 }, + { url = "https://files.pythonhosted.org/packages/aa/70/f8724f31abc0b329ca98b33d73c14020168babcf71b0cba3cded5d9d0e66/ruff-0.7.4-py3-none-win_arm64.whl", hash = "sha256:11bff065102c3ae9d3ea4dc9ecdfe5a5171349cdd0787c1fc64761212fc9cf1f", size = 8851590 }, +] + [[package]] name = "shellingham" version = "1.5.4" From 7d2a2c668db13e976e912e8b13983a7ef58395a7 Mon Sep 17 00:00:00 2001 From: Bob Belderbos Date: Mon, 18 Nov 2024 15:52:47 +0100 Subject: [PATCH 03/10] remove ruff, we already run it in pre-commit, running it in CI is redundant --- .github/workflows/python-app.yml | 5 +---- pyproject.toml | 1 - uv.lock | 27 --------------------------- 3 files changed, 1 insertion(+), 32 deletions(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 2261d61..ac6fbc7 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -1,4 +1,4 @@ -name: Linting and Tests +name: Tests on: push: @@ -27,8 +27,5 @@ jobs: - name: Install the project run: uv sync --all-extras --dev - - name: Run linter - run: uv run ruff check --output-format=github . - - name: Run unit tests run: uv run pytest tests -k "not test_e2e" diff --git a/pyproject.toml b/pyproject.toml index 98b3861..dcbe7d0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -25,7 +25,6 @@ dev = [ "pytest-cov>=5.0.0", "pre-commit>=4.0.1", "pytest-coverage>=0.0", - "ruff>=0.7.4", ] [project.urls] diff --git a/uv.lock b/uv.lock index a2ff10b..bb83ca5 100644 --- a/uv.lock +++ b/uv.lock @@ -181,7 +181,6 @@ dev = [ { name = "pytest" }, { name = "pytest-cov" }, { name = "pytest-coverage" }, - { name = "ruff" }, ] [package.metadata] @@ -198,7 +197,6 @@ requires-dist = [ { name = "requests", specifier = ">=2.32.3" }, { name = "requests-cache", specifier = ">=1.2.1" }, { name = "rich", specifier = ">=13.9.2" }, - { name = "ruff", marker = "extra == 'dev'", specifier = ">=0.7.4" }, { name = "typer", specifier = ">=0.12.5" }, ] @@ -567,31 +565,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/67/91/5474b84e505a6ccc295b2d322d90ff6aa0746745717839ee0c5fb4fdcceb/rich-13.9.2-py3-none-any.whl", hash = "sha256:8c82a3d3f8dcfe9e734771313e606b39d8247bb6b826e196f4914b333b743cf1", size = 242117 }, ] -[[package]] -name = "ruff" -version = "0.7.4" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/0b/8b/bc4e0dfa1245b07cf14300e10319b98e958a53ff074c1dd86b35253a8c2a/ruff-0.7.4.tar.gz", hash = "sha256:cd12e35031f5af6b9b93715d8c4f40360070b2041f81273d0527683d5708fce2", size = 3275547 } -wheels = [ - { url = "https://files.pythonhosted.org/packages/e6/4b/f5094719e254829766b807dadb766841124daba75a37da83e292ae5ad12f/ruff-0.7.4-py3-none-linux_armv6l.whl", hash = "sha256:a4919925e7684a3f18e18243cd6bea7cfb8e968a6eaa8437971f681b7ec51478", size = 10447512 }, - { url = "https://files.pythonhosted.org/packages/9e/1d/3d2d2c9f601cf6044799c5349ff5267467224cefed9b35edf5f1f36486e9/ruff-0.7.4-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:cfb365c135b830778dda8c04fb7d4280ed0b984e1aec27f574445231e20d6c63", size = 10235436 }, - { url = "https://files.pythonhosted.org/packages/62/83/42a6ec6216ded30b354b13e0e9327ef75a3c147751aaf10443756cb690e9/ruff-0.7.4-py3-none-macosx_11_0_arm64.whl", hash = "sha256:63a569b36bc66fbadec5beaa539dd81e0527cb258b94e29e0531ce41bacc1f20", size = 9888936 }, - { url = "https://files.pythonhosted.org/packages/4d/26/e1e54893b13046a6ad05ee9b89ee6f71542ba250f72b4c7a7d17c3dbf73d/ruff-0.7.4-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0d06218747d361d06fd2fdac734e7fa92df36df93035db3dc2ad7aa9852cb109", size = 10697353 }, - { url = "https://files.pythonhosted.org/packages/21/24/98d2e109c4efc02bfef144ec6ea2c3e1217e7ce0cfddda8361d268dfd499/ruff-0.7.4-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:e0cea28d0944f74ebc33e9f934238f15c758841f9f5edd180b5315c203293452", size = 10228078 }, - { url = "https://files.pythonhosted.org/packages/ad/b7/964c75be9bc2945fc3172241b371197bb6d948cc69e28bc4518448c368f3/ruff-0.7.4-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:80094ecd4793c68b2571b128f91754d60f692d64bc0d7272ec9197fdd09bf9ea", size = 11264823 }, - { url = "https://files.pythonhosted.org/packages/12/8d/20abdbf705969914ce40988fe71a554a918deaab62c38ec07483e77866f6/ruff-0.7.4-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:997512325c6620d1c4c2b15db49ef59543ef9cd0f4aa8065ec2ae5103cedc7e7", size = 11951855 }, - { url = "https://files.pythonhosted.org/packages/b8/fc/6519ce58c57b4edafcdf40920b7273dfbba64fc6ebcaae7b88e4dc1bf0a8/ruff-0.7.4-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:00b4cf3a6b5fad6d1a66e7574d78956bbd09abfd6c8a997798f01f5da3d46a05", size = 11516580 }, - { url = "https://files.pythonhosted.org/packages/37/1a/5ec1844e993e376a86eb2456496831ed91b4398c434d8244f89094758940/ruff-0.7.4-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:7dbdc7d8274e1422722933d1edddfdc65b4336abf0b16dfcb9dedd6e6a517d06", size = 12692057 }, - { url = "https://files.pythonhosted.org/packages/50/90/76867152b0d3c05df29a74bb028413e90f704f0f6701c4801174ba47f959/ruff-0.7.4-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0e92dfb5f00eaedb1501b2f906ccabfd67b2355bdf117fea9719fc99ac2145bc", size = 11085137 }, - { url = "https://files.pythonhosted.org/packages/c8/eb/0a7cb6059ac3555243bd026bb21785bbc812f7bbfa95a36c101bd72b47ae/ruff-0.7.4-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:3bd726099f277d735dc38900b6a8d6cf070f80828877941983a57bca1cd92172", size = 10681243 }, - { url = "https://files.pythonhosted.org/packages/5e/76/2270719dbee0fd35780b05c08a07b7a726c3da9f67d9ae89ef21fc18e2e5/ruff-0.7.4-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:2e32829c429dd081ee5ba39aef436603e5b22335c3d3fff013cd585806a6486a", size = 10319187 }, - { url = "https://files.pythonhosted.org/packages/9f/e5/39100f72f8ba70bec1bd329efc880dea8b6c1765ea1cb9d0c1c5f18b8d7f/ruff-0.7.4-py3-none-musllinux_1_2_i686.whl", hash = "sha256:662a63b4971807623f6f90c1fb664613f67cc182dc4d991471c23c541fee62dd", size = 10803715 }, - { url = "https://files.pythonhosted.org/packages/a5/89/40e904784f305fb56850063f70a998a64ebba68796d823dde67e89a24691/ruff-0.7.4-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:876f5e09eaae3eb76814c1d3b68879891d6fde4824c015d48e7a7da4cf066a3a", size = 11162912 }, - { url = "https://files.pythonhosted.org/packages/8d/1b/dd77503b3875c51e3dbc053fd8367b845ab8b01c9ca6d0c237082732856c/ruff-0.7.4-py3-none-win32.whl", hash = "sha256:75c53f54904be42dd52a548728a5b572344b50d9b2873d13a3f8c5e3b91f5cac", size = 8702767 }, - { url = "https://files.pythonhosted.org/packages/63/76/253ddc3e89e70165bba952ecca424b980b8d3c2598ceb4fc47904f424953/ruff-0.7.4-py3-none-win_amd64.whl", hash = "sha256:745775c7b39f914238ed1f1b0bebed0b9155a17cd8bc0b08d3c87e4703b990d6", size = 9497534 }, - { url = "https://files.pythonhosted.org/packages/aa/70/f8724f31abc0b329ca98b33d73c14020168babcf71b0cba3cded5d9d0e66/ruff-0.7.4-py3-none-win_arm64.whl", hash = "sha256:11bff065102c3ae9d3ea4dc9ecdfe5a5171349cdd0787c1fc64761212fc9cf1f", size = 8851590 }, -] - [[package]] name = "shellingham" version = "1.5.4" From ecb1c2a0ef8681049c84a8427189487ff5a36373 Mon Sep 17 00:00:00 2001 From: Bob Belderbos Date: Thu, 12 Dec 2024 18:29:42 +0100 Subject: [PATCH 04/10] with free bite should be able to run all tests in workflow now --- .github/workflows/python-app.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index ac6fbc7..a197d32 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -28,4 +28,4 @@ jobs: run: uv sync --all-extras --dev - name: Run unit tests - run: uv run pytest tests -k "not test_e2e" + run: uv run pytest tests From ba7de9648fc00edba65f44c370ccc517be5cd23e Mon Sep 17 00:00:00 2001 From: Bob Belderbos Date: Thu, 12 Dec 2024 18:40:41 +0100 Subject: [PATCH 05/10] install browser step --- .github/workflows/python-app.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index a197d32..7224788 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -27,5 +27,8 @@ jobs: - name: Install the project run: uv sync --all-extras --dev - - name: Run unit tests + - name: Install Playwright browers + run: uv run playwright install + + - name: Run tests run: uv run pytest tests From ed30eae6e1c87a02535e3b72f95bcfcd850b32ff Mon Sep 17 00:00:00 2001 From: Bob Belderbos Date: Fri, 13 Dec 2024 08:14:56 +0100 Subject: [PATCH 06/10] reverting back to unit test only --- .github/workflows/python-app.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 7224788..b4c36c6 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -31,4 +31,4 @@ jobs: run: uv run playwright install - name: Run tests - run: uv run pytest tests + run: uv run pytest tests -k "not test_e2e" From db2f9c97b66559a2edc14abac8a914b8563d15fd Mon Sep 17 00:00:00 2001 From: Bob Belderbos Date: Fri, 13 Dec 2024 08:15:34 +0100 Subject: [PATCH 07/10] no need for this step anymore if not e2e testing in gh action --- .github/workflows/python-app.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index b4c36c6..4772774 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -27,8 +27,5 @@ jobs: - name: Install the project run: uv sync --all-extras --dev - - name: Install Playwright browers - run: uv run playwright install - - name: Run tests run: uv run pytest tests -k "not test_e2e" From 13a91fc7ba88948d48f543e35051eb453cd1b580 Mon Sep 17 00:00:00 2001 From: Bob Belderbos Date: Wed, 29 Jan 2025 16:02:17 +0100 Subject: [PATCH 08/10] fixes https://github.com/PyBites-Open-Source/eatlocal/issues/37 also updated uv version --- .github/workflows/publish.yml | 31 +++++++++++++++++++++++++++++++ .github/workflows/python-app.yml | 2 +- 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..6c7c826 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,31 @@ +name: Publish Python 🐍 distributions 📦 to PyPI and TestPyPI + +on: + push: + tags: + - "*" + +jobs: + build-and-publish: + name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Install uv + uses: astral-sh/setup-uv@v3 + with: + version: "0.5.25" + enable-cache: true + cache-dependency-glob: "uv.lock" + + - name: Build distributions + run: uv build + + - name: Publish to TestPyPI + run: uv publish --index-url https://test.pypi.org/legacy/ --token ${{ secrets.TEST_PYPI_API_TOKEN }} || echo "TestPyPI upload failed, continuing..." + + - name: Publish to PyPI + if: startsWith(github.ref, 'refs/tags') + run: uv publish --token ${{ secrets.PYPI_API_TOKEN }} diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 7224788..66337f0 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -17,7 +17,7 @@ jobs: - name: Install uv uses: astral-sh/setup-uv@v3 with: - version: "0.5.2" + version: "0.5.25" enable-cache: true cache-dependency-glob: "uv.lock" From 099c5aae4b05a6b6047f85348f21ac79fb0a6f13 Mon Sep 17 00:00:00 2001 From: Bob Belderbos Date: Wed, 29 Jan 2025 16:02:47 +0100 Subject: [PATCH 09/10] rename workflow --- .github/workflows/{python-app.yml => tests.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{python-app.yml => tests.yml} (100%) diff --git a/.github/workflows/python-app.yml b/.github/workflows/tests.yml similarity index 100% rename from .github/workflows/python-app.yml rename to .github/workflows/tests.yml From 5690471f3645ee1b2e04ec5dbb3aba434142b9d9 Mon Sep 17 00:00:00 2001 From: Bob Belderbos Date: Wed, 29 Jan 2025 16:07:18 +0100 Subject: [PATCH 10/10] the pypi if was redundant, let's use test pypi for a test tag --- .github/workflows/publish.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 6c7c826..b28d6e5 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -23,9 +23,10 @@ jobs: - name: Build distributions run: uv build - - name: Publish to TestPyPI - run: uv publish --index-url https://test.pypi.org/legacy/ --token ${{ secrets.TEST_PYPI_API_TOKEN }} || echo "TestPyPI upload failed, continuing..." + - name: Publish to TestPyPI (for test tags) + if: startsWith(github.ref, 'refs/tags/test-') + run: uv publish --index-url https://test.pypi.org/legacy/ --token ${{ secrets.TEST_PYPI_API_TOKEN }} - - name: Publish to PyPI - if: startsWith(github.ref, 'refs/tags') + - name: Publish to PyPI (for versioned releases) + if: startsWith(github.ref, 'refs/tags/v') run: uv publish --token ${{ secrets.PYPI_API_TOKEN }}