diff options
author | David Robertson <davidr@element.io> | 2022-03-01 19:47:02 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-01 19:47:02 +0000 |
commit | 5f62a094de10b4c4382908231128dace833a1195 (patch) | |
tree | 449c41f85a95f4a9adb7766c176f839407a308e6 | |
parent | Use importlib.metadata to read requirements (#12088) (diff) | |
download | synapse-5f62a094de10b4c4382908231128dace833a1195.tar.xz |
Detox, part 1 of N (#12119)
* Don't use `tox` for `check-sampleconfig` * Don't use `tox` for check-newsfragment
-rw-r--r-- | .github/workflows/tests.yml | 13 | ||||
-rw-r--r-- | changelog.d/12119.misc | 1 | ||||
-rwxr-xr-x | scripts-dev/check-newsfragment | 2 | ||||
-rw-r--r-- | tox.ini | 10 |
4 files changed, 12 insertions, 14 deletions
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index bbf1033bdd..e9e4277322 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" @@ -43,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 }} @@ -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/changelog.d/12119.misc b/changelog.d/12119.misc new file mode 100644 index 0000000000..f02d140f38 --- /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 diff --git a/scripts-dev/check-newsfragment b/scripts-dev/check-newsfragment index c764011d6a..493558ad65 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 436ecf7552..04b972e2c5 100644 --- a/tox.ini +++ b/tox.ini @@ -168,16 +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:check-sampleconfig] -commands = {toxinidir}/scripts-dev/generate_sample_config --check - [testenv:combine] skip_install = true usedevelop = false |