Skip to content

Don't re-send Matrix invites if the user is already invited #203

Don't re-send Matrix invites if the user is already invited

Don't re-send Matrix invites if the user is already invited #203

Workflow file for this run

name: E2E tests
on:
push:
branches: ["master"]
pull_request:
workflow_dispatch:
jobs:
build-homerunner:
runs-on: ubuntu-latest
outputs:
homerunnersha: ${{ steps.gitsha.outputs.sha }}
steps:
- name: Checkout matrix-org/complement
uses: actions/checkout@v3
with:
repository: matrix-org/complement
- name: Get complement git sha
id: gitsha
run: echo sha=`git rev-parse --short HEAD` >> "$GITHUB_OUTPUT"
- name: Cache homerunner
id: cached
uses: actions/cache@v3
with:
path: homerunner
key: ${{ runner.os }}-homerunner-${{ steps.gitsha.outputs.sha }}
- name: "Set Go Version"
if: ${{ steps.cached.outputs.cache-hit != 'true' }}
run: |
echo "$GOROOT_1_18_X64/bin" >> $GITHUB_PATH
echo "~/go/bin" >> $GITHUB_PATH
# Build and install homerunner
- name: Install Complement Dependencies
if: ${{ steps.cached.outputs.cache-hit != 'true' }}
run: |
sudo apt-get update && sudo apt-get install -y libolm3 libolm-dev
- name: Build homerunner
if: ${{ steps.cached.outputs.cache-hit != 'true' }}
run: |
go build ./cmd/homerunner
integration-test:
runs-on: ubuntu-latest
timeout-minutes: 30
needs:
- build-homerunner
steps:
- name: Install Complement Dependencies
run: |
sudo apt-get update && sudo apt-get install -y libolm3
- name: Load cached homerunner bin
uses: actions/cache@v3
with:
path: homerunner
key: ${{ runner.os }}-homerunner-${{ needs.build-synapse.outputs.homerunnersha }}
fail-on-cache-miss: true # Shouldn't happen, we build this in the needs step.
- name: Checkout conference-bot
uses: actions/checkout@v3
with:
path: conference-bot
- name: Build test image
# Set `build` as the target (rather than default to the final, prune'd
# stage), as `build` includes the dev dependencies which are needed for
# testing.
run: |
docker build --target build -t conference-bot-test:local ./conference-bot
# Regression test for https://github.com/matrix-org/conference-bot/pull/264.
- name: Check the matrix-bot-sdk was built correctly
run: |
docker run --rm conference-bot-test:local node -e "require('matrix-bot-sdk')"
- name: Run Homerunner tests (docker)
timeout-minutes: 10
env:
HOMERUNNER_IMAGE: ghcr.io/element-hq/synapse/complement-synapse:latest
HOMERUNNER_SPAWN_HS_TIMEOUT_SECS: 100
NODE_OPTIONS: --dns-result-order ipv4first
run: |
docker pull $HOMERUNNER_IMAGE
./homerunner &
docker run --rm --network=host \
-e HOMERUNNER_IMAGE \
-e HOMERUNNER_SPAWN_HS_TIMEOUT_SECS \
-e NODE_OPTIONS \
conference-bot-test:local \
pnpm run test:e2e