Skip to content

Commit

Permalink
Merge pull request #1515 from matrix-org/hs/port-ci
Browse files Browse the repository at this point in the history
Use GitHub Actions for tests (and bump minimum version to Node 14)
  • Loading branch information
Half-Shot authored Feb 4, 2022
2 parents 595d019 + 2089673 commit 1bbbbb6
Show file tree
Hide file tree
Showing 8 changed files with 271 additions and 45 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/main.yml → .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ on:
workflow_dispatch:

jobs:
deploy:
runs-on: ubuntu-18.04
docs:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2

Expand All @@ -20,7 +20,7 @@ jobs:
- name: Setup mdBook
uses: peaceiris/actions-mdbook@v1
with:
mdbook-version: '0.4.7'
mdbook-version: '0.4.15'

- run: mdbook build

Expand Down
74 changes: 74 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: Tests

on:
push:

workflow_dispatch:

jobs:
lint:
runs-on: ubuntu-20.04
container: node:16
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: 16
- run: npm ci
- run: npm run-script lint

test-14:
runs-on: ubuntu-20.04
container: node:14
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: 14
- run: npm ci
- run: npm run-script test

test-16:
runs-on: ubuntu-20.04
container: node:16
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: 16
- run: npm ci
- run: npm run-script test

test-16-postgres:
runs-on: ubuntu-20.04
container: node:16
services:
postgres:
image: postgres:latest
env:
POSTGRES_DB: postgres
POSTGRES_PASSWORD: postgres_password
POSTGRES_PORT: 5432
POSTGRES_USER: postgres_user
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: 16
- run: npm ci
- run: npm run-script test
env:
IRCBRIDGE_TEST_PGDB: "ircbridge_integtest"
IRCBRIDGE_TEST_PGURL: "postgresql://postgres_user:postgres_password@postgres"
IRCBRIDGE_TEST_ENABLEPG: "yes"
1 change: 1 addition & 0 deletions changelog.d/1515.removal
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
**Minimum required Node version is now 14**. Users on Node 12 are advised to update to newer versions.
3 changes: 1 addition & 2 deletions docs/bridge_setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ This guide is written for server administrators who would like to set up their o
We recommend using Node.JS `v14` or greater when setting up the bridge, as we use `worker_threads` to handle
some of the traffic for larger bridges.

If you wish to use Node.JS v10, you should enable the `--experimental-worker` on the commandline.
Please note that we offer no support for Node 10.
Versions older than Node 14 are no longer supported.

You should also ensure you have a recent Matrix homeserver that you have permission to bridge to. This can
either be your own, or one that you have the ability to setup Application Services with.
Expand Down
Loading

0 comments on commit 1bbbbb6

Please sign in to comment.