tests.yml 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642
  1. name: Tests
  2. on:
  3. push:
  4. branches: ["develop", "release-*"]
  5. pull_request:
  6. merge_group:
  7. workflow_dispatch:
  8. concurrency:
  9. group: ${{ github.workflow }}-${{ github.ref }}
  10. cancel-in-progress: true
  11. jobs:
  12. # Job to detect what has changed so we don't run e.g. Rust checks on PRs that
  13. # don't modify Rust code.
  14. changes:
  15. runs-on: ubuntu-latest
  16. outputs:
  17. rust: ${{ !startsWith(github.ref, 'refs/pull/') || steps.filter.outputs.rust }}
  18. steps:
  19. - uses: dorny/paths-filter@v2
  20. id: filter
  21. # We only check on PRs
  22. if: startsWith(github.ref, 'refs/pull/')
  23. with:
  24. filters: |
  25. rust:
  26. - 'rust/**'
  27. - 'Cargo.toml'
  28. - 'Cargo.lock'
  29. check-sampleconfig:
  30. runs-on: ubuntu-latest
  31. steps:
  32. - uses: actions/checkout@v3
  33. - name: Install Rust
  34. uses: dtolnay/rust-toolchain@1.58.1
  35. - uses: Swatinem/rust-cache@v2
  36. - uses: matrix-org/setup-python-poetry@v1
  37. with:
  38. python-version: "3.x"
  39. poetry-version: "1.3.2"
  40. extras: "all"
  41. - run: poetry run scripts-dev/generate_sample_config.sh --check
  42. - run: poetry run scripts-dev/config-lint.sh
  43. check-schema-delta:
  44. runs-on: ubuntu-latest
  45. steps:
  46. - uses: actions/checkout@v3
  47. - uses: actions/setup-python@v4
  48. with:
  49. python-version: "3.x"
  50. - run: "pip install 'click==8.1.1' 'GitPython>=3.1.20'"
  51. - run: scripts-dev/check_schema_delta.py --force-colors
  52. check-lockfile:
  53. runs-on: ubuntu-latest
  54. steps:
  55. - uses: actions/checkout@v3
  56. - uses: actions/setup-python@v4
  57. with:
  58. python-version: "3.x"
  59. - run: .ci/scripts/check_lockfile.py
  60. lint:
  61. runs-on: ubuntu-latest
  62. steps:
  63. - name: Checkout repository
  64. uses: actions/checkout@v3
  65. - name: Setup Poetry
  66. uses: matrix-org/setup-python-poetry@v1
  67. with:
  68. install-project: "false"
  69. - name: Import order (isort)
  70. run: poetry run isort --check --diff .
  71. - name: Code style (black)
  72. run: poetry run black --check --diff .
  73. - name: Semantic checks (ruff)
  74. # --quiet suppresses the update check.
  75. run: poetry run ruff --quiet .
  76. lint-mypy:
  77. runs-on: ubuntu-latest
  78. name: Typechecking
  79. steps:
  80. - name: Checkout repository
  81. uses: actions/checkout@v3
  82. - name: Setup Poetry
  83. uses: matrix-org/setup-python-poetry@v1
  84. with:
  85. # We want to make use of type hints in optional dependencies too.
  86. extras: all
  87. # We have seen odd mypy failures that were resolved when we started
  88. # installing the project again:
  89. # https://github.com/matrix-org/synapse/pull/15376#issuecomment-1498983775
  90. # To make CI green, err towards caution and install the project.
  91. install-project: "true"
  92. - name: Install Rust
  93. uses: dtolnay/rust-toolchain@1.58.1
  94. - uses: Swatinem/rust-cache@v2
  95. # NB: I have two concerns with this action:
  96. # 1. We occasionally see odd mypy problems that aren't reproducible
  97. # locally with clean caches. I suspect some dodgy caching behaviour.
  98. # 2. The action uses GHA machinery that's deprecated
  99. # (https://github.com/AustinScola/mypy-cache-github-action/issues/277)
  100. # It may be simpler to use actions/cache ourselves to restore .mypy_cache.
  101. - name: Restore/persist mypy's cache
  102. uses: AustinScola/mypy-cache-github-action@df56268388422ee282636ee2c7a9cc55ec644a41
  103. - name: Run mypy
  104. run: poetry run mypy
  105. lint-crlf:
  106. runs-on: ubuntu-latest
  107. steps:
  108. - uses: actions/checkout@v3
  109. - name: Check line endings
  110. run: scripts-dev/check_line_terminators.sh
  111. lint-newsfile:
  112. if: ${{ (github.base_ref == 'develop' || contains(github.base_ref, 'release-')) && github.actor != 'dependabot[bot]' }}
  113. runs-on: ubuntu-latest
  114. steps:
  115. - uses: actions/checkout@v3
  116. with:
  117. ref: ${{ github.event.pull_request.head.sha }}
  118. fetch-depth: 0
  119. - uses: actions/setup-python@v4
  120. with:
  121. python-version: "3.x"
  122. - run: "pip install 'towncrier>=18.6.0rc1'"
  123. - run: scripts-dev/check-newsfragment.sh
  124. env:
  125. PULL_REQUEST_NUMBER: ${{ github.event.number }}
  126. lint-pydantic:
  127. runs-on: ubuntu-latest
  128. steps:
  129. - uses: actions/checkout@v3
  130. with:
  131. ref: ${{ github.event.pull_request.head.sha }}
  132. - name: Install Rust
  133. uses: dtolnay/rust-toolchain@1.58.1
  134. - uses: Swatinem/rust-cache@v2
  135. - uses: matrix-org/setup-python-poetry@v1
  136. with:
  137. poetry-version: "1.3.2"
  138. extras: "all"
  139. - run: poetry run scripts-dev/check_pydantic_models.py
  140. lint-clippy:
  141. runs-on: ubuntu-latest
  142. needs: changes
  143. if: ${{ needs.changes.outputs.rust == 'true' }}
  144. steps:
  145. - uses: actions/checkout@v3
  146. - name: Install Rust
  147. uses: dtolnay/rust-toolchain@1.58.1
  148. with:
  149. components: clippy
  150. - uses: Swatinem/rust-cache@v2
  151. - run: cargo clippy -- -D warnings
  152. # We also lint against a nightly rustc so that we can lint the benchmark
  153. # suite, which requires a nightly compiler.
  154. lint-clippy-nightly:
  155. runs-on: ubuntu-latest
  156. needs: changes
  157. if: ${{ needs.changes.outputs.rust == 'true' }}
  158. steps:
  159. - uses: actions/checkout@v3
  160. - name: Install Rust
  161. uses: dtolnay/rust-toolchain@master
  162. with:
  163. toolchain: nightly-2022-12-01
  164. components: clippy
  165. - uses: Swatinem/rust-cache@v2
  166. - run: cargo clippy --all-features -- -D warnings
  167. lint-rustfmt:
  168. runs-on: ubuntu-latest
  169. needs: changes
  170. if: ${{ needs.changes.outputs.rust == 'true' }}
  171. steps:
  172. - uses: actions/checkout@v3
  173. - name: Install Rust
  174. uses: dtolnay/rust-toolchain@master
  175. with:
  176. # We use nightly so that it correctly groups together imports
  177. toolchain: nightly-2022-12-01
  178. components: rustfmt
  179. - uses: Swatinem/rust-cache@v2
  180. - run: cargo fmt --check
  181. # Dummy step to gate other tests on without repeating the whole list
  182. linting-done:
  183. if: ${{ !cancelled() }} # Run this even if prior jobs were skipped
  184. needs:
  185. - lint
  186. - lint-mypy
  187. - lint-crlf
  188. - lint-newsfile
  189. - lint-pydantic
  190. - check-sampleconfig
  191. - check-schema-delta
  192. - check-lockfile
  193. - lint-clippy
  194. - lint-rustfmt
  195. runs-on: ubuntu-latest
  196. steps:
  197. - run: "true"
  198. calculate-test-jobs:
  199. if: ${{ !cancelled() && !failure() }} # Allow previous steps to be skipped, but not fail
  200. needs: linting-done
  201. runs-on: ubuntu-latest
  202. steps:
  203. - uses: actions/checkout@v3
  204. - uses: actions/setup-python@v4
  205. with:
  206. python-version: "3.x"
  207. - id: get-matrix
  208. run: .ci/scripts/calculate_jobs.py
  209. outputs:
  210. trial_test_matrix: ${{ steps.get-matrix.outputs.trial_test_matrix }}
  211. sytest_test_matrix: ${{ steps.get-matrix.outputs.sytest_test_matrix }}
  212. trial:
  213. if: ${{ !cancelled() && !failure() }} # Allow previous steps to be skipped, but not fail
  214. needs: calculate-test-jobs
  215. runs-on: ubuntu-latest
  216. strategy:
  217. matrix:
  218. job: ${{ fromJson(needs.calculate-test-jobs.outputs.trial_test_matrix) }}
  219. steps:
  220. - uses: actions/checkout@v3
  221. - run: sudo apt-get -qq install xmlsec1
  222. - name: Set up PostgreSQL ${{ matrix.job.postgres-version }}
  223. if: ${{ matrix.job.postgres-version }}
  224. # 1. Mount postgres data files onto a tmpfs in-memory filesystem to reduce overhead of docker's overlayfs layer.
  225. # 2. Expose the unix socket for postgres. This removes latency of using docker-proxy for connections.
  226. run: |
  227. docker run -d -p 5432:5432 \
  228. --tmpfs /var/lib/postgres:rw,size=6144m \
  229. --mount 'type=bind,src=/var/run/postgresql,dst=/var/run/postgresql' \
  230. -e POSTGRES_PASSWORD=postgres \
  231. -e POSTGRES_INITDB_ARGS="--lc-collate C --lc-ctype C --encoding UTF8" \
  232. postgres:${{ matrix.job.postgres-version }}
  233. - name: Install Rust
  234. uses: dtolnay/rust-toolchain@1.58.1
  235. - uses: Swatinem/rust-cache@v2
  236. - uses: matrix-org/setup-python-poetry@v1
  237. with:
  238. python-version: ${{ matrix.job.python-version }}
  239. poetry-version: "1.3.2"
  240. extras: ${{ matrix.job.extras }}
  241. - name: Await PostgreSQL
  242. if: ${{ matrix.job.postgres-version }}
  243. timeout-minutes: 2
  244. run: until pg_isready -h localhost; do sleep 1; done
  245. - run: poetry run trial --jobs=6 tests
  246. env:
  247. SYNAPSE_POSTGRES: ${{ matrix.job.database == 'postgres' || '' }}
  248. SYNAPSE_POSTGRES_HOST: /var/run/postgresql
  249. SYNAPSE_POSTGRES_USER: postgres
  250. SYNAPSE_POSTGRES_PASSWORD: postgres
  251. - name: Dump logs
  252. # Logs are most useful when the command fails, always include them.
  253. if: ${{ always() }}
  254. # Note: Dumps to workflow logs instead of using actions/upload-artifact
  255. # This keeps logs colocated with failing jobs
  256. # It also ignores find's exit code; this is a best effort affair
  257. run: >-
  258. find _trial_temp -name '*.log'
  259. -exec echo "::group::{}" \;
  260. -exec cat {} \;
  261. -exec echo "::endgroup::" \;
  262. || true
  263. trial-olddeps:
  264. # Note: sqlite only; no postgres
  265. if: ${{ !cancelled() && !failure() }} # Allow previous steps to be skipped, but not fail
  266. needs: linting-done
  267. runs-on: ubuntu-20.04
  268. steps:
  269. - uses: actions/checkout@v3
  270. - name: Install Rust
  271. uses: dtolnay/rust-toolchain@1.58.1
  272. - uses: Swatinem/rust-cache@v2
  273. # There aren't wheels for some of the older deps, so we need to install
  274. # their build dependencies
  275. - run: |
  276. sudo apt-get -qq install build-essential libffi-dev python-dev \
  277. libxml2-dev libxslt-dev xmlsec1 zlib1g-dev libjpeg-dev libwebp-dev
  278. - uses: actions/setup-python@v4
  279. with:
  280. python-version: '3.7'
  281. # Calculating the old-deps actually takes a bunch of time, so we cache the
  282. # pyproject.toml / poetry.lock. We need to cache pyproject.toml as
  283. # otherwise the `poetry install` step will error due to the poetry.lock
  284. # file being outdated.
  285. #
  286. # This caches the output of `Prepare old deps`, which should generate the
  287. # same `pyproject.toml` and `poetry.lock` for a given `pyproject.toml` input.
  288. - uses: actions/cache@v3
  289. id: cache-poetry-old-deps
  290. name: Cache poetry.lock
  291. with:
  292. path: |
  293. poetry.lock
  294. pyproject.toml
  295. key: poetry-old-deps2-${{ hashFiles('pyproject.toml') }}
  296. - name: Prepare old deps
  297. if: steps.cache-poetry-old-deps.outputs.cache-hit != 'true'
  298. run: .ci/scripts/prepare_old_deps.sh
  299. # We only now install poetry so that `setup-python-poetry` caches the
  300. # right poetry.lock's dependencies.
  301. - uses: matrix-org/setup-python-poetry@v1
  302. with:
  303. python-version: '3.7'
  304. poetry-version: "1.3.2"
  305. extras: "all test"
  306. - run: poetry run trial -j6 tests
  307. - name: Dump logs
  308. # Logs are most useful when the command fails, always include them.
  309. if: ${{ always() }}
  310. # Note: Dumps to workflow logs instead of using actions/upload-artifact
  311. # This keeps logs colocated with failing jobs
  312. # It also ignores find's exit code; this is a best effort affair
  313. run: >-
  314. find _trial_temp -name '*.log'
  315. -exec echo "::group::{}" \;
  316. -exec cat {} \;
  317. -exec echo "::endgroup::" \;
  318. || true
  319. trial-pypy:
  320. # Very slow; only run if the branch name includes 'pypy'
  321. # Note: sqlite only; no postgres. Completely untested since poetry move.
  322. if: ${{ contains(github.ref, 'pypy') && !failure() && !cancelled() }}
  323. needs: linting-done
  324. runs-on: ubuntu-latest
  325. strategy:
  326. matrix:
  327. python-version: ["pypy-3.7"]
  328. extras: ["all"]
  329. steps:
  330. - uses: actions/checkout@v3
  331. # Install libs necessary for PyPy to build binary wheels for dependencies
  332. - run: sudo apt-get -qq install xmlsec1 libxml2-dev libxslt-dev
  333. - uses: matrix-org/setup-python-poetry@v1
  334. with:
  335. python-version: ${{ matrix.python-version }}
  336. poetry-version: "1.3.2"
  337. extras: ${{ matrix.extras }}
  338. - run: poetry run trial --jobs=2 tests
  339. - name: Dump logs
  340. # Logs are most useful when the command fails, always include them.
  341. if: ${{ always() }}
  342. # Note: Dumps to workflow logs instead of using actions/upload-artifact
  343. # This keeps logs colocated with failing jobs
  344. # It also ignores find's exit code; this is a best effort affair
  345. run: >-
  346. find _trial_temp -name '*.log'
  347. -exec echo "::group::{}" \;
  348. -exec cat {} \;
  349. -exec echo "::endgroup::" \;
  350. || true
  351. sytest:
  352. if: ${{ !failure() && !cancelled() }}
  353. needs: calculate-test-jobs
  354. runs-on: ubuntu-latest
  355. container:
  356. image: matrixdotorg/sytest-synapse:${{ matrix.job.sytest-tag }}
  357. volumes:
  358. - ${{ github.workspace }}:/src
  359. env:
  360. SYTEST_BRANCH: ${{ github.head_ref }}
  361. POSTGRES: ${{ matrix.job.postgres && 1}}
  362. MULTI_POSTGRES: ${{ (matrix.job.postgres == 'multi-postgres') && 1}}
  363. ASYNCIO_REACTOR: ${{ (matrix.job.reactor == 'asyncio') && 1 }}
  364. WORKERS: ${{ matrix.job.workers && 1 }}
  365. BLACKLIST: ${{ matrix.job.workers && 'synapse-blacklist-with-workers' }}
  366. TOP: ${{ github.workspace }}
  367. strategy:
  368. fail-fast: false
  369. matrix:
  370. job: ${{ fromJson(needs.calculate-test-jobs.outputs.sytest_test_matrix) }}
  371. steps:
  372. - uses: actions/checkout@v3
  373. - name: Prepare test blacklist
  374. run: cat sytest-blacklist .ci/worker-blacklist > synapse-blacklist-with-workers
  375. - name: Install Rust
  376. uses: dtolnay/rust-toolchain@1.58.1
  377. - uses: Swatinem/rust-cache@v2
  378. - name: Run SyTest
  379. run: /bootstrap.sh synapse
  380. working-directory: /src
  381. - name: Summarise results.tap
  382. if: ${{ always() }}
  383. run: /sytest/scripts/tap_to_gha.pl /logs/results.tap
  384. - name: Upload SyTest logs
  385. uses: actions/upload-artifact@v3
  386. if: ${{ always() }}
  387. with:
  388. name: Sytest Logs - ${{ job.status }} - (${{ join(matrix.job.*, ', ') }})
  389. path: |
  390. /logs/results.tap
  391. /logs/**/*.log*
  392. export-data:
  393. if: ${{ !failure() && !cancelled() }} # Allow previous steps to be skipped, but not fail
  394. needs: [linting-done, portdb]
  395. runs-on: ubuntu-latest
  396. env:
  397. TOP: ${{ github.workspace }}
  398. services:
  399. postgres:
  400. image: postgres
  401. ports:
  402. - 5432:5432
  403. env:
  404. POSTGRES_PASSWORD: "postgres"
  405. POSTGRES_INITDB_ARGS: "--lc-collate C --lc-ctype C --encoding UTF8"
  406. options: >-
  407. --health-cmd pg_isready
  408. --health-interval 10s
  409. --health-timeout 5s
  410. --health-retries 5
  411. steps:
  412. - uses: actions/checkout@v3
  413. - run: sudo apt-get -qq install xmlsec1 postgresql-client
  414. - uses: matrix-org/setup-python-poetry@v1
  415. with:
  416. poetry-version: "1.3.2"
  417. extras: "postgres"
  418. - run: .ci/scripts/test_export_data_command.sh
  419. env:
  420. PGHOST: localhost
  421. PGUSER: postgres
  422. PGPASSWORD: postgres
  423. PGDATABASE: postgres
  424. portdb:
  425. if: ${{ !failure() && !cancelled() }} # Allow previous steps to be skipped, but not fail
  426. needs: linting-done
  427. runs-on: ubuntu-latest
  428. strategy:
  429. matrix:
  430. include:
  431. - python-version: "3.7"
  432. postgres-version: "11"
  433. - python-version: "3.11"
  434. postgres-version: "15"
  435. services:
  436. postgres:
  437. image: postgres:${{ matrix.postgres-version }}
  438. ports:
  439. - 5432:5432
  440. env:
  441. POSTGRES_PASSWORD: "postgres"
  442. POSTGRES_INITDB_ARGS: "--lc-collate C --lc-ctype C --encoding UTF8"
  443. options: >-
  444. --health-cmd pg_isready
  445. --health-interval 10s
  446. --health-timeout 5s
  447. --health-retries 5
  448. steps:
  449. - uses: actions/checkout@v3
  450. - name: Add PostgreSQL apt repository
  451. # We need a version of pg_dump that can handle the version of
  452. # PostgreSQL being tested against. The Ubuntu package repository lags
  453. # behind new releases, so we have to use the PostreSQL apt repository.
  454. # Steps taken from https://www.postgresql.org/download/linux/ubuntu/
  455. run: |
  456. sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
  457. wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
  458. sudo apt-get update
  459. - run: sudo apt-get -qq install xmlsec1 postgresql-client
  460. - uses: matrix-org/setup-python-poetry@v1
  461. with:
  462. python-version: ${{ matrix.python-version }}
  463. poetry-version: "1.3.2"
  464. extras: "postgres"
  465. - run: .ci/scripts/test_synapse_port_db.sh
  466. id: run_tester_script
  467. env:
  468. PGHOST: localhost
  469. PGUSER: postgres
  470. PGPASSWORD: postgres
  471. PGDATABASE: postgres
  472. - name: "Upload schema differences"
  473. uses: actions/upload-artifact@v3
  474. if: ${{ failure() && !cancelled() && steps.run_tester_script.outcome == 'failure' }}
  475. with:
  476. name: Schema dumps
  477. path: |
  478. unported.sql
  479. ported.sql
  480. schema_diff
  481. complement:
  482. if: "${{ !failure() && !cancelled() }}"
  483. needs: linting-done
  484. runs-on: ubuntu-latest
  485. strategy:
  486. fail-fast: false
  487. matrix:
  488. include:
  489. - arrangement: monolith
  490. database: SQLite
  491. - arrangement: monolith
  492. database: Postgres
  493. - arrangement: workers
  494. database: Postgres
  495. steps:
  496. - name: Run actions/checkout@v3 for synapse
  497. uses: actions/checkout@v3
  498. with:
  499. path: synapse
  500. - name: Install Rust
  501. uses: dtolnay/rust-toolchain@1.58.1
  502. - uses: Swatinem/rust-cache@v2
  503. - uses: actions/setup-go@v4
  504. - name: Prepare Complement's Prerequisites
  505. run: synapse/.ci/scripts/setup_complement_prerequisites.sh
  506. - run: |
  507. set -o pipefail
  508. COMPLEMENT_DIR=`pwd`/complement synapse/scripts-dev/complement.sh -json 2>&1 | synapse/.ci/scripts/gotestfmt
  509. shell: bash
  510. env:
  511. POSTGRES: ${{ (matrix.database == 'Postgres') && 1 || '' }}
  512. WORKERS: ${{ (matrix.arrangement == 'workers') && 1 || '' }}
  513. name: Run Complement Tests
  514. cargo-test:
  515. if: ${{ needs.changes.outputs.rust == 'true' }}
  516. runs-on: ubuntu-latest
  517. needs:
  518. - linting-done
  519. - changes
  520. steps:
  521. - uses: actions/checkout@v3
  522. - name: Install Rust
  523. uses: dtolnay/rust-toolchain@1.58.1
  524. - uses: Swatinem/rust-cache@v2
  525. - run: cargo test
  526. # We want to ensure that the cargo benchmarks still compile, which requires a
  527. # nightly compiler.
  528. cargo-bench:
  529. if: ${{ needs.changes.outputs.rust == 'true' }}
  530. runs-on: ubuntu-latest
  531. needs:
  532. - linting-done
  533. - changes
  534. steps:
  535. - uses: actions/checkout@v3
  536. - name: Install Rust
  537. uses: dtolnay/rust-toolchain@master
  538. with:
  539. toolchain: nightly-2022-12-01
  540. - uses: Swatinem/rust-cache@v2
  541. - run: cargo bench --no-run
  542. # a job which marks all the other jobs as complete, thus allowing PRs to be merged.
  543. tests-done:
  544. if: ${{ always() }}
  545. needs:
  546. - trial
  547. - trial-olddeps
  548. - sytest
  549. - export-data
  550. - portdb
  551. - complement
  552. - cargo-test
  553. - cargo-bench
  554. runs-on: ubuntu-latest
  555. steps:
  556. - uses: matrix-org/done-action@v2
  557. with:
  558. needs: ${{ toJSON(needs) }}
  559. # The newsfile lint may be skipped on non PR builds
  560. # Cargo test is skipped if there is no changes on Rust code
  561. skippable: |
  562. lint-newsfile
  563. cargo-test
  564. cargo-bench