summary refs log tree commit diff
diff options
context:
space:
mode:
authorAndrew Morgan <andrew@amorgan.xyz>2023-07-14 14:56:28 +0100
committerAndrew Morgan <andrew@amorgan.xyz>2023-07-14 14:56:28 +0100
commit066f3084b62b01c96ac36efceb5ebbf3bf1e466f (patch)
tree4f78fed8da7855fdf4efb2ca2eda668601600b1f
parentAdd CI to check the nix development environment builds successfully (diff)
downloadsynapse-066f3084b62b01c96ac36efceb5ebbf3bf1e466f.tar.xz
Run unit tests, sytest and complement tests
-rw-r--r--.github/workflows/development-environment.yml34
1 files changed, 30 insertions, 4 deletions
diff --git a/.github/workflows/development-environment.yml b/.github/workflows/development-environment.yml

index b83522f95f..8dd2c48baa 100644 --- a/.github/workflows/development-environment.yml +++ b/.github/workflows/development-environment.yml
@@ -1,13 +1,39 @@ -name: "Build the nix development environment" +name: "Build the nix development environment and run tests" on: + # TODO: Only run nightly pull_request: - push: jobs: - build_dev_env: + nix_dev_env_tests: runs-on: ubuntu-latest + strategy: + matrix: + test: ["unit", "sytest", "complement"] steps: - uses: actions/checkout@v3 - uses: cachix/install-nix-action@6ed004b9ccb68dbc28e7c85bee15fa93dbd214ac # v22 with: nix_path: nixpkgs=channel:nixos-unstable - - run: nix develop --impure \ No newline at end of file + + # Start the development environment. + - run: nix develop --impure + + # Sanity check we can import/run Synapse. + - run: python -m synapse.app.homeserver --help + + # Run the unit tests. + - if: ${{ matrix.unit }} + run: python -m twisted.trial -j6 tests + + # Run SyTest test suite. + - if: ${{ matrix.sytest }} + uses: actions/checkout@v3 + with: + repository: 'matrix-org/sytest' + path: './sytest' + + - if: ${{ matrix.sytest }} + run: ./sytest/run-tests.pl --test-blacklist-file sytest-blacklist + + # Run Complement test suite + - if: ${{ matrix.complement }} + run: ./scripts-dev/complement.sh