a4a50a4a5c
* Update jest monorepo * -w * Fix guest rooms test to use async/await instead of a done callback The done callback was never being called because it relies on a `process.nextTick()` deep within the mock. For this test we don't get a "next tick" because the event loop is busy, so we instead cargocult some test infrastructure from surrounding tests and verify the expected API call was cleared from the queue. * Enable github-actions reporter * Don't override local reporters * Stop DeviceLists at end of tests * stop more clients * Fix tests and DRY typing * Fix client/crypto stopping in tests * Fix Buffer c'tor deprecated warnings * Fix devicelist-integ test being excluded due to poor naming Co-authored-by: Renovate Bot <bot@renovateapp.com> Co-authored-by: Travis Ralston <travisr@matrix.org> Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
38 lines
792 B
YAML
38 lines
792 B
YAML
name: Tests
|
|
on:
|
|
pull_request: { }
|
|
push:
|
|
branches: [ develop, master ]
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
jobs:
|
|
jest:
|
|
name: Jest
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Yarn cache
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
cache: 'yarn'
|
|
|
|
- name: Install dependencies
|
|
run: "yarn install"
|
|
|
|
- name: Build
|
|
run: "yarn build"
|
|
|
|
- name: Run tests with coverage
|
|
run: "yarn coverage --ci --reporters github-actions"
|
|
|
|
- name: Upload Artifact
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: coverage
|
|
path: |
|
|
coverage
|
|
!coverage/lcov-report
|