mirror of
https://github.com/the-draupnir-project/Draupnir.git
synced 2026-03-29 10:29:57 +00:00
https://github.com/the-draupnir-project/planning/issues/104 I don't know what the fuck they are doing with the typings in the vector bot-sdk repository but whatever. https://github.com/the-draupnir-project/Draupnir/issues/1053
88 lines
2.4 KiB
YAML
88 lines
2.4 KiB
YAML
# SPDX-FileCopyrightText: 2024 Gnuxie <Gnuxie@protonmail.com>
|
|
#
|
|
# SPDX-License-Identifier: CC0-1.0
|
|
|
|
name: Tests
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
branches: [main]
|
|
schedule:
|
|
- cron: "20 20 * * *"
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
|
|
jobs:
|
|
build:
|
|
name: Build & Lint
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
|
|
- name: Specifically use node 24 like in the readme.
|
|
uses: actions/setup-node@v6
|
|
with:
|
|
node-version: "24"
|
|
- run: corepack enable
|
|
- run: corepack npm install
|
|
- run: corepack npm run build:all
|
|
- run: corepack npm run lint
|
|
unit:
|
|
name: Unit tests
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
- name: Specifically use node 24 like in the readme.
|
|
uses: actions/setup-node@v6
|
|
with:
|
|
node-version: "24"
|
|
- run: corepack npm install
|
|
- run: corepack npm run build:all
|
|
- run: corepack npm run test
|
|
integration:
|
|
name: Integration tests
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 60
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
- uses: actions/setup-node@v6
|
|
with:
|
|
node-version: "24"
|
|
- name: Fetch and build mx-tester (cached across runs)
|
|
uses: baptiste0928/cargo-install@v3
|
|
with:
|
|
crate: mx-tester
|
|
version: "0.3.3"
|
|
- name: Setup dependencies
|
|
run: corepack npm install && corepack npm run build:all
|
|
- name: Setup image
|
|
run: RUST_LOG=debug,hyper=info,rusttls=info mx-tester build up
|
|
- name: Run tests
|
|
run: RUST_LOG=debug,hyper=info,rusttls=info mx-tester run
|
|
- name: Cleanup
|
|
run: mx-tester down
|
|
appservice-integration:
|
|
name: Application Service Integration tests
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 30
|
|
steps:
|
|
- uses: actions/setup-node@v6
|
|
- uses: actions/checkout@v6
|
|
with:
|
|
node-version: "24"
|
|
- name: Fetch and build mx-tester (cached across runs)
|
|
uses: baptiste0928/cargo-install@v3
|
|
with:
|
|
crate: mx-tester
|
|
version: "0.3.3"
|
|
- name: Setup dependencies
|
|
run: corepack npm install && corepack npm run build:all
|
|
- name: Setup image
|
|
run: RUST_LOG=debug,hyper=info,rusttls=info mx-tester build up
|
|
- name: Run tests
|
|
run: corepack npm run -w apps/draupnir test:appservice:integration
|
|
- name: Cleanup
|
|
run: mx-tester down
|