From e310d304a2ea69bddf4373ba948599f9605193e5 Mon Sep 17 00:00:00 2001 From: David Robertson Date: Thu, 24 Feb 2022 14:17:33 +0000 Subject: [PATCH 1/5] Don't use `tox` for `check-sampleconfig` --- .github/workflows/tests.yml | 11 +++++++++-- tox.ini | 3 --- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index bbf1033bdd2c..e18380b5518d 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -10,12 +10,19 @@ concurrency: cancel-in-progress: true jobs: + check-sampleconfig: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + - run: pip install -e . + - run: scripts-dev/generate_sample_config --check + lint: runs-on: ubuntu-latest strategy: matrix: toxenv: - - "check-sampleconfig" - "check_codestyle" - "check_isort" - "mypy" @@ -51,7 +58,7 @@ jobs: # Dummy step to gate other tests on without repeating the whole list linting-done: if: ${{ !cancelled() }} # Run this even if prior jobs were skipped - needs: [lint, lint-crlf, lint-newsfile] + needs: [lint, lint-crlf, lint-newsfile, check-sampleconfig] runs-on: ubuntu-latest steps: - run: "true" diff --git a/tox.ini b/tox.ini index 436ecf7552f7..b5468d79ed03 100644 --- a/tox.ini +++ b/tox.ini @@ -175,9 +175,6 @@ deps = towncrier>=18.6.0rc1 commands = python -m towncrier.check --compare-with=origin/develop -[testenv:check-sampleconfig] -commands = {toxinidir}/scripts-dev/generate_sample_config --check - [testenv:combine] skip_install = true usedevelop = false From 24722cbe6683c4de969978fbf0e06ba273c6a023 Mon Sep 17 00:00:00 2001 From: David Robertson Date: Thu, 24 Feb 2022 14:25:38 +0000 Subject: [PATCH 2/5] Don't use `tox` for check-newsfragment --- .github/workflows/tests.yml | 2 +- scripts-dev/check-newsfragment | 2 +- tox.ini | 7 ------- 3 files changed, 2 insertions(+), 9 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index e18380b5518d..e9e427732239 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -50,7 +50,7 @@ jobs: ref: ${{ github.event.pull_request.head.sha }} fetch-depth: 0 - uses: actions/setup-python@v2 - - run: pip install tox + - run: "pip install 'towncrier>=18.6.0rc1'" - run: scripts-dev/check-newsfragment env: PULL_REQUEST_NUMBER: ${{ github.event.number }} diff --git a/scripts-dev/check-newsfragment b/scripts-dev/check-newsfragment index c764011d6adb..493558ad651b 100755 --- a/scripts-dev/check-newsfragment +++ b/scripts-dev/check-newsfragment @@ -35,7 +35,7 @@ CONTRIBUTING_GUIDE_TEXT="!! Please see the contributing guide for help writing y https://github.com/matrix-org/synapse/blob/develop/CONTRIBUTING.md#changelog" # If check-newsfragment returns a non-zero exit code, print the contributing guide and exit -tox -qe check-newsfragment || (echo -e "$CONTRIBUTING_GUIDE_TEXT" >&2 && exit 1) +python -m towncrier.check --compare-with=origin/develop || (echo -e "$CONTRIBUTING_GUIDE_TEXT" >&2 && exit 1) echo echo "--------------------------" diff --git a/tox.ini b/tox.ini index b5468d79ed03..04b972e2c58c 100644 --- a/tox.ini +++ b/tox.ini @@ -168,13 +168,6 @@ commands = extras = lint commands = isort -c --df {[base]lint_targets} -[testenv:check-newsfragment] -skip_install = true -usedevelop = false -deps = towncrier>=18.6.0rc1 -commands = - python -m towncrier.check --compare-with=origin/develop - [testenv:combine] skip_install = true usedevelop = false From 010a5a70603f8e3c0a9aabd9ad90d184cf9cc6bd Mon Sep 17 00:00:00 2001 From: David Robertson Date: Tue, 1 Mar 2022 16:43:53 +0000 Subject: [PATCH 3/5] Changelog --- changelog.d/12119.misc | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/12119.misc diff --git a/changelog.d/12119.misc b/changelog.d/12119.misc new file mode 100644 index 000000000000..f02d140f3871 --- /dev/null +++ b/changelog.d/12119.misc @@ -0,0 +1 @@ +Move CI checks out of tox, to facilitate a move to using poetry. \ No newline at end of file From e13908cdeb9e8c6c9db75a104a0f24e13a618ac0 Mon Sep 17 00:00:00 2001 From: David Robertson Date: Tue, 1 Mar 2022 17:12:35 +0000 Subject: [PATCH 4/5] Deliberately break CI --- changelog.d/12119.misc | 2 +- docs/sample_config.yaml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/changelog.d/12119.misc b/changelog.d/12119.misc index f02d140f3871..6257ee5db495 100644 --- a/changelog.d/12119.misc +++ b/changelog.d/12119.misc @@ -1 +1 @@ -Move CI checks out of tox, to facilitate a move to using poetry. \ No newline at end of file +Move CI checks out of tox, to facilitate a move to using poetry. NO FULLSTOP SHOULD TRIGGER CI TO FAIL \ No newline at end of file diff --git a/docs/sample_config.yaml b/docs/sample_config.yaml index 6f3623c88ab9..465e08ca3baa 100644 --- a/docs/sample_config.yaml +++ b/docs/sample_config.yaml @@ -49,6 +49,7 @@ modules: ## Server ## +THIS SHOULD TRIGGER CI TO FAIL # The public-facing domain of the server # From 4969ea54a085bece1a6531077647d6e6d4ae4c06 Mon Sep 17 00:00:00 2001 From: David Robertson Date: Tue, 1 Mar 2022 17:15:23 +0000 Subject: [PATCH 5/5] Revert "Deliberately break CI" This reverts commit e13908cdeb9e8c6c9db75a104a0f24e13a618ac0. --- changelog.d/12119.misc | 2 +- docs/sample_config.yaml | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/changelog.d/12119.misc b/changelog.d/12119.misc index 6257ee5db495..f02d140f3871 100644 --- a/changelog.d/12119.misc +++ b/changelog.d/12119.misc @@ -1 +1 @@ -Move CI checks out of tox, to facilitate a move to using poetry. NO FULLSTOP SHOULD TRIGGER CI TO FAIL \ No newline at end of file +Move CI checks out of tox, to facilitate a move to using poetry. \ No newline at end of file diff --git a/docs/sample_config.yaml b/docs/sample_config.yaml index 465e08ca3baa..6f3623c88ab9 100644 --- a/docs/sample_config.yaml +++ b/docs/sample_config.yaml @@ -49,7 +49,6 @@ modules: ## Server ## -THIS SHOULD TRIGGER CI TO FAIL # The public-facing domain of the server #