From 66ecdd820b349ecdb430a97f6676609d109d4978 Mon Sep 17 00:00:00 2001 From: Matthew Feickert Date: Wed, 20 Sep 2023 11:32:13 -0500 Subject: [PATCH] ci: Move PYTHONWARNINGS filter on build to weekly cron job (#2337) * Move PYTHONWARNINGS filter to run on a weekly cron job to avoid interrupting normal development with errors due to warnings outside of direct user control. --- .github/workflows/publish-package.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish-package.yml b/.github/workflows/publish-package.yml index eb956eb506..187391b1a3 100644 --- a/.github/workflows/publish-package.yml +++ b/.github/workflows/publish-package.yml @@ -11,6 +11,9 @@ on: - release/v* release: types: [published] + # Run weekly at 1:23 UTC + schedule: + - cron: '23 1 * * 0' workflow_dispatch: inputs: publish: @@ -44,7 +47,13 @@ jobs: python -m pip install build twine python -m pip list - - name: Build a wheel and a sdist + - name: Build a sdist and wheel + if: github.event_name != 'schedule' + run: | + python -m build . + + - name: Build a sdist and wheel and check for warnings + if: github.event_name == 'schedule' run: | PYTHONWARNINGS=error,default::DeprecationWarning python -m build .