Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 78 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ on:
paths-ignore:
- '**.md'
push:
branches:
- main
# branches:
# - main
paths-ignore:
- '**.md'

Expand All @@ -31,4 +31,79 @@ jobs:
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}


sytest:
name: Run a subset of sytest suite
runs-on: ubuntu-24.04
# strategy:
# matrix:
# tests:
# - 50federation/00prepare.pl
# - 50federation/01keys.pl
steps:
- uses: actions/checkout@v4
with:
path: homeserver

- uses: actions/checkout@v4
with:
repository: RocketChat/sytest
ref: homeport
path: sytest

- uses: actions/cache@v4
id: cpan
with:
path: /home/runner/lib/perl5
key: cpan-cache

- run: |
export PERL5LIB=$HOME/lib/perl5
export PERL_MB_OPT=--install_base=$HOME
export PERL_MM_OPT=INSTALL_BASE=$HOME
sudo apt install libpq-dev -y
./install-deps.pl || ./install-deps.pl
working-directory: sytest
if: steps.cpan.outputs.cache-hit != 'true'

- uses: oven-sh/setup-bun@v2
with:
bun-version: '1.2.0'

- uses: actions/cache@v4
id: cache
with:
path: homeserver/node_modules
key: node_modules-${{ hashFiles('**/bun.lockdb') }}

- name: Install deps
if: steps.cache.outputs.cache-hit != 'true'
working-directory: homeserver
run: bun install


- name: Start MongoDB
uses: supercharge/mongodb-github-action@1.12.0
with:
mongodb-version: '6.0'

- name: Start homeserver
shell: bash
working-directory: homeserver
env:
NODE_TLS_REJECT_UNAUTHORIZED: 0
MONGODB_URI: mongodb://localhost:27017/rocket
HOMESERVER_CONFIG_name: localhost:8448
HOMESERVER_CONFIG_port: 8448
run: |
bun run index.ts 2>&1 >/tmp/homeserver.log &
sleep 10

- name: Start test
working-directory: sytest
shell: bash
run: |
export PERL5LIB=$HOME/lib/perl5
export PERL_MB_OPT=--install_base=$HOME
export PERL_MM_OPT=INSTALL_BASE=$HOME
./run-tests.pl -I Manual --bind-host 127.0.0.1 tests/50federation/00.prepare.pl tests/50federation/01keys.pl
Loading