mirror of https://github.com/zulip/zulip.git
ci: Reorder tests to run unique tests first.
As discussed in the comment, it doesn't really make sense for our 4 jobs that we run in parallel for different platforms to all start with running the backend tests. While it's true that puppeteer will likely fail if the backend doesn't run, and thus there's a mild prerequisite relationship there, what is far more common is the node tests fail and the user doesn't get that input for 10 minutes unnecessarily while all the backend jobs run, and this change lets us avoid that.
This commit is contained in:
parent
292595afc4
commit
396cedd0e8
|
@ -115,11 +115,26 @@ jobs:
|
||||||
source tools/ci/activate-venv
|
source tools/ci/activate-venv
|
||||||
./tools/run-codespell
|
./tools/run-codespell
|
||||||
|
|
||||||
- name: Run backend lint
|
# We run the tests that are only run in a specific job early, so
|
||||||
|
# that we get feedback to the developer about likely failures as
|
||||||
|
# quickly as possible. Backend/mypy failures that aren't
|
||||||
|
# identical across different versions are much more rare than
|
||||||
|
# frontend linter or node test failures.
|
||||||
|
- name: Run documentation and api tests
|
||||||
|
if: ${{ matrix.include_documentation_tests }}
|
||||||
run: |
|
run: |
|
||||||
source tools/ci/activate-venv
|
source tools/ci/activate-venv
|
||||||
echo "Test suite is running under $(python --version)."
|
# In CI, we only test links we control in test-documentation to avoid flakes
|
||||||
./tools/lint --groups=backend --skip=gitlint,mypy # gitlint disabled because flaky
|
./tools/test-documentation --skip-external-links
|
||||||
|
./tools/test-help-documentation --skip-external-links
|
||||||
|
./tools/test-api
|
||||||
|
|
||||||
|
- name: Run node tests
|
||||||
|
if: ${{ matrix.include_frontend_tests }}
|
||||||
|
run: |
|
||||||
|
source tools/ci/activate-venv
|
||||||
|
# Run the node tests first, since they're fast and deterministic
|
||||||
|
./tools/test-js-with-node --coverage --parallel=1
|
||||||
|
|
||||||
- name: Run frontend lint
|
- name: Run frontend lint
|
||||||
if: ${{ matrix.include_frontend_tests }}
|
if: ${{ matrix.include_frontend_tests }}
|
||||||
|
@ -127,6 +142,37 @@ jobs:
|
||||||
source tools/ci/activate-venv
|
source tools/ci/activate-venv
|
||||||
./tools/lint --groups=frontend --skip=gitlint # gitlint disabled because flaky
|
./tools/lint --groups=frontend --skip=gitlint # gitlint disabled because flaky
|
||||||
|
|
||||||
|
- name: Check schemas
|
||||||
|
if: ${{ matrix.include_frontend_tests }}
|
||||||
|
run: |
|
||||||
|
source tools/ci/activate-venv
|
||||||
|
# Check that various schemas are consistent. (is fast)
|
||||||
|
./tools/check-schemas
|
||||||
|
|
||||||
|
- name: Check capitalization of strings
|
||||||
|
if: ${{ matrix.include_frontend_tests }}
|
||||||
|
run: |
|
||||||
|
source tools/ci/activate-venv
|
||||||
|
./manage.py makemessages --locale en
|
||||||
|
PYTHONWARNINGS=ignore ./tools/check-capitalization --no-generate
|
||||||
|
PYTHONWARNINGS=ignore ./tools/check-frontend-i18n --no-generate
|
||||||
|
|
||||||
|
- name: Run puppeteer tests
|
||||||
|
if: ${{ matrix.include_frontend_tests }}
|
||||||
|
run: |
|
||||||
|
source tools/ci/activate-venv
|
||||||
|
./tools/test-js-with-puppeteer
|
||||||
|
|
||||||
|
- name: Check pnpm dedupe
|
||||||
|
if: ${{ matrix.include_frontend_tests }}
|
||||||
|
run: pnpm dedupe --check
|
||||||
|
|
||||||
|
- name: Run backend lint
|
||||||
|
run: |
|
||||||
|
source tools/ci/activate-venv
|
||||||
|
echo "Test suite is running under $(python --version)."
|
||||||
|
./tools/lint --groups=backend --skip=gitlint,mypy # gitlint disabled because flaky
|
||||||
|
|
||||||
- name: Run backend tests
|
- name: Run backend tests
|
||||||
run: |
|
run: |
|
||||||
source tools/ci/activate-venv
|
source tools/ci/activate-venv
|
||||||
|
@ -166,47 +212,6 @@ jobs:
|
||||||
./scripts/lib/check-database-compatibility
|
./scripts/lib/check-database-compatibility
|
||||||
chmod 755 static/generated web/generated
|
chmod 755 static/generated web/generated
|
||||||
|
|
||||||
- name: Run documentation and api tests
|
|
||||||
if: ${{ matrix.include_documentation_tests }}
|
|
||||||
run: |
|
|
||||||
source tools/ci/activate-venv
|
|
||||||
# In CI, we only test links we control in test-documentation to avoid flakes
|
|
||||||
./tools/test-documentation --skip-external-links
|
|
||||||
./tools/test-help-documentation --skip-external-links
|
|
||||||
./tools/test-api
|
|
||||||
|
|
||||||
- name: Run node tests
|
|
||||||
if: ${{ matrix.include_frontend_tests }}
|
|
||||||
run: |
|
|
||||||
source tools/ci/activate-venv
|
|
||||||
# Run the node tests first, since they're fast and deterministic
|
|
||||||
./tools/test-js-with-node --coverage --parallel=1
|
|
||||||
|
|
||||||
- name: Check schemas
|
|
||||||
if: ${{ matrix.include_frontend_tests }}
|
|
||||||
run: |
|
|
||||||
source tools/ci/activate-venv
|
|
||||||
# Check that various schemas are consistent. (is fast)
|
|
||||||
./tools/check-schemas
|
|
||||||
|
|
||||||
- name: Check capitalization of strings
|
|
||||||
if: ${{ matrix.include_frontend_tests }}
|
|
||||||
run: |
|
|
||||||
source tools/ci/activate-venv
|
|
||||||
./manage.py makemessages --locale en
|
|
||||||
PYTHONWARNINGS=ignore ./tools/check-capitalization --no-generate
|
|
||||||
PYTHONWARNINGS=ignore ./tools/check-frontend-i18n --no-generate
|
|
||||||
|
|
||||||
- name: Run puppeteer tests
|
|
||||||
if: ${{ matrix.include_frontend_tests }}
|
|
||||||
run: |
|
|
||||||
source tools/ci/activate-venv
|
|
||||||
./tools/test-js-with-puppeteer
|
|
||||||
|
|
||||||
- name: Check pnpm dedupe
|
|
||||||
if: ${{ matrix.include_frontend_tests }}
|
|
||||||
run: pnpm dedupe --check
|
|
||||||
|
|
||||||
- name: Check for untracked files
|
- name: Check for untracked files
|
||||||
run: |
|
run: |
|
||||||
source tools/ci/activate-venv
|
source tools/ci/activate-venv
|
||||||
|
|
Loading…
Reference in New Issue