Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit 5f62a09

Browse files
author
David Robertson
authored
Detox, part 1 of N (#12119)
* Don't use `tox` for `check-sampleconfig` * Don't use `tox` for check-newsfragment
1 parent 313581e commit 5f62a09

File tree

4 files changed

+12
-14
lines changed

4 files changed

+12
-14
lines changed

.github/workflows/tests.yml

+10-3
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,19 @@ concurrency:
1010
cancel-in-progress: true
1111

1212
jobs:
13+
check-sampleconfig:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v2
17+
- uses: actions/setup-python@v2
18+
- run: pip install -e .
19+
- run: scripts-dev/generate_sample_config --check
20+
1321
lint:
1422
runs-on: ubuntu-latest
1523
strategy:
1624
matrix:
1725
toxenv:
18-
- "check-sampleconfig"
1926
- "check_codestyle"
2027
- "check_isort"
2128
- "mypy"
@@ -43,15 +50,15 @@ jobs:
4350
ref: ${{ github.event.pull_request.head.sha }}
4451
fetch-depth: 0
4552
- uses: actions/setup-python@v2
46-
- run: pip install tox
53+
- run: "pip install 'towncrier>=18.6.0rc1'"
4754
- run: scripts-dev/check-newsfragment
4855
env:
4956
PULL_REQUEST_NUMBER: ${{ github.event.number }}
5057

5158
# Dummy step to gate other tests on without repeating the whole list
5259
linting-done:
5360
if: ${{ !cancelled() }} # Run this even if prior jobs were skipped
54-
needs: [lint, lint-crlf, lint-newsfile]
61+
needs: [lint, lint-crlf, lint-newsfile, check-sampleconfig]
5562
runs-on: ubuntu-latest
5663
steps:
5764
- run: "true"

changelog.d/12119.misc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Move CI checks out of tox, to facilitate a move to using poetry.

scripts-dev/check-newsfragment

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ CONTRIBUTING_GUIDE_TEXT="!! Please see the contributing guide for help writing y
3535
https://github.com/matrix-org/synapse/blob/develop/CONTRIBUTING.md#changelog"
3636

3737
# If check-newsfragment returns a non-zero exit code, print the contributing guide and exit
38-
tox -qe check-newsfragment || (echo -e "$CONTRIBUTING_GUIDE_TEXT" >&2 && exit 1)
38+
python -m towncrier.check --compare-with=origin/develop || (echo -e "$CONTRIBUTING_GUIDE_TEXT" >&2 && exit 1)
3939

4040
echo
4141
echo "--------------------------"

tox.ini

-10
Original file line numberDiff line numberDiff line change
@@ -168,16 +168,6 @@ commands =
168168
extras = lint
169169
commands = isort -c --df {[base]lint_targets}
170170

171-
[testenv:check-newsfragment]
172-
skip_install = true
173-
usedevelop = false
174-
deps = towncrier>=18.6.0rc1
175-
commands =
176-
python -m towncrier.check --compare-with=origin/develop
177-
178-
[testenv:check-sampleconfig]
179-
commands = {toxinidir}/scripts-dev/generate_sample_config --check
180-
181171
[testenv:combine]
182172
skip_install = true
183173
usedevelop = false

0 commit comments

Comments
 (0)