From 7d9c83edeb7746d6522f89f8c1a02c0935bc15b8 Mon Sep 17 00:00:00 2001 From: EXPLOSION Date: Wed, 8 Feb 2023 03:34:33 +0000 Subject: [PATCH 1/2] Run pip-compile in formatting check Additionally, commit autoformatter changes for Dependabot --- .github/workflows/ci.yml | 8 ++++++++ check.sh | 8 ++++++++ docs-requirements.txt | 6 ++++-- test-requirements.in | 1 + test-requirements.txt | 36 ++++++++++++++++++++++++++++++++---- 5 files changed, 53 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 92bc20539d..047083876f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -120,6 +120,14 @@ jobs: CHECK_FORMATTING: '${{ matrix.check_formatting }}' # Should match 'name:' up above JOB_NAME: 'Ubuntu (${{ matrix.python }}${{ matrix.extra_name }})' + - name: Commit autoformatter changes + continue-on-error: true + if: failure() && matrix.check_formatting == '1' && github.actor == 'dependabot[bot]' + run: | + git config user.name github-actions + git config user.email github-actions@github.com + git commit -am "Autoformatter changes" + git push macOS: name: 'macOS (${{ matrix.python }})' diff --git a/check.sh b/check.sh index 57f1e2db40..fbd440521c 100755 --- a/check.sh +++ b/check.sh @@ -28,6 +28,14 @@ mypy -m trio -m trio.testing --platform linux || EXIT_STATUS=$? mypy -m trio -m trio.testing --platform darwin || EXIT_STATUS=$? # tests FreeBSD too mypy -m trio -m trio.testing --platform win32 || EXIT_STATUS=$? +# Check pip compile is consistent +pip-compile test-requirements.in +pip-compile docs-requirements.in + +if git status --porcelain | grep -q "requirements.txt"; then + EXIT_STATUS=1 +fi + # Finally, leave a really clear warning of any issues and exit if [ $EXIT_STATUS -ne 0 ]; then cat < Date: Fri, 10 Feb 2023 14:34:19 +0000 Subject: [PATCH 2/2] Use the correct user for GitHub Actions --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 047083876f..1584e356f2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -124,8 +124,8 @@ jobs: continue-on-error: true if: failure() && matrix.check_formatting == '1' && github.actor == 'dependabot[bot]' run: | - git config user.name github-actions - git config user.email github-actions@github.com + git config user.name 'github-actions[bot]' + git config user.email '41898282+github-actions[bot]@users.noreply.github.com' git commit -am "Autoformatter changes" git push