mirror of
https://github.com/the-draupnir-project/Draupnir.git
synced 2026-10-15 21:59:53 +00:00
Ci in a Box / Build & Lint / Node 24 / alpine / amd64 (push) Canceled after 0s
Ci in a Box / Build & Lint / Node 24 / slim / amd64 (push) Canceled after 0s
Ci in a Box / Build & Lint / Node 26 / alpine / amd64 (push) Canceled after 0s
Ci in a Box / Build & Lint / Node 24 / alpine / arm64 (push) Canceled after 0s
Ci in a Box / Build & Lint / Node 24 / slim / arm64 (push) Canceled after 0s
Ci in a Box / Application Service Integration tests / Node 24 / slim / amd64 (push) Canceled after 0s
Ci in a Box / Application Service Integration tests / Node 26 / alpine / amd64 (push) Canceled after 0s
Ci in a Box / Application Service Integration tests / Node 24 / alpine / arm64 (push) Canceled after 0s
Ci in a Box / Application Service Integration tests / Node 24 / slim / arm64 (push) Canceled after 0s
Docker Hub - Develop / docker-latest (push) Canceled after 0s
GHCR - Development Branches / ghcr-publish (push) Canceled after 0s
Tests / Build & Lint (push) Canceled after 0s
Ci in a Box / Unit tests / Node 24 / alpine / amd64 (push) Canceled after 0s
Ci in a Box / Unit tests / Node 24 / slim / amd64 (push) Canceled after 0s
Ci in a Box / Unit tests / Node 26 / alpine / amd64 (push) Canceled after 0s
Ci in a Box / Unit tests / Node 24 / alpine / arm64 (push) Canceled after 0s
Ci in a Box / Unit tests / Node 24 / slim / arm64 (push) Canceled after 0s
Ci in a Box / Integration tests / Node 24 / alpine / amd64 (push) Canceled after 0s
Ci in a Box / Integration tests / Node 24 / slim / amd64 (push) Canceled after 0s
Ci in a Box / Integration tests / Node 26 / alpine / amd64 (push) Canceled after 0s
Ci in a Box / Integration tests / Node 24 / alpine / arm64 (push) Canceled after 0s
Ci in a Box / Integration tests / Node 24 / slim / arm64 (push) Canceled after 0s
Ci in a Box / Application Service Integration tests / Node 24 / alpine / amd64 (push) Canceled after 0s
Tests / Unit tests (push) Canceled after 0s
Tests / Integration tests (push) Canceled after 0s
Tests / Application Service Integration tests (push) Canceled after 0s
Validate Docker Build / validate-docker-build (push) Canceled after 0s
* Reduce Ci in a box test matrix size in CI. Reduces the amount of noise the box is creating at the cost of reduced test coverage. Requested by Gnuxie. * Remove unneeded box prefix.
288 lines
9.9 KiB
YAML
288 lines
9.9 KiB
YAML
# SPDX-FileCopyrightText: 2026 Catalan Lover <catalanlover@protonmail.com>
|
|
#
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
# Called Box here to have the name that shows up in github GUI not be the full Ci in a box
|
|
name: Ci in a Box
|
|
|
|
on:
|
|
push:
|
|
branches-ignore:
|
|
- "github-actions/**"
|
|
- "gh-readonly-queue/**"
|
|
schedule:
|
|
- cron: "20 20 * * *"
|
|
pull_request:
|
|
branches-ignore:
|
|
- "github-actions/**"
|
|
merge_group:
|
|
branches: [main]
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
env:
|
|
CI_BOX_COMPOSE_FILE: ci-in-a-box/compose.yaml
|
|
DRAUPNIR_CONTEXT: ..
|
|
DRAUPNIR_DOCKERFILE: ci-in-a-box/Dockerfile-Draupnir-Develop
|
|
DRAUPNIR_CONFIG_SOURCE: ../config
|
|
REVERSE_PROXY_CONFIG_PATH: ./scripts/nginx/nginx.conf
|
|
REVERSE_PROXY_NEWS_PATH: ../apps/draupnir/test/draupnir_news.json
|
|
SYNAPSE_HTTP_ANTISPAM_SOURCE: ../synapse-http-antispam/synapse_http_antispam.py
|
|
|
|
jobs:
|
|
build:
|
|
name:
|
|
Build & Lint / Node ${{ matrix.node }} / ${{ matrix.variant }} / ${{
|
|
matrix.arch }}
|
|
runs-on: ${{ matrix.runner }}
|
|
continue-on-error: ${{ matrix.node == '26' }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
node: ["24", "26"]
|
|
variant: [slim, alpine]
|
|
arch: [amd64, arm64]
|
|
exclude:
|
|
- node: "26"
|
|
variant: alpine
|
|
arch: arm64
|
|
- node: "26"
|
|
variant: slim
|
|
arch: arm64
|
|
- node: "26"
|
|
variant: slim
|
|
arch: amd64
|
|
include:
|
|
- arch: amd64
|
|
runner: ubuntu-24.04
|
|
- arch: arm64
|
|
runner: ubuntu-24.04-arm
|
|
env:
|
|
CI_BOX_PROJECT:
|
|
ci-in-a-box-node${{ matrix.node }}-${{ matrix.variant }}-${{ matrix.arch
|
|
}}
|
|
CI_BOX_VARIANT_FILE:
|
|
ci-in-a-box/compose.node${{ matrix.node }}-${{ matrix.variant }}.yaml
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
|
|
- name: Validate Compose configuration
|
|
run:
|
|
docker compose -p "$CI_BOX_PROJECT" -f "$CI_BOX_COMPOSE_FILE" -f
|
|
"$CI_BOX_VARIANT_FILE" --profile '*' config --quiet
|
|
- name: Build and lint
|
|
run:
|
|
docker compose -p "$CI_BOX_PROJECT" -f "$CI_BOX_COMPOSE_FILE" -f
|
|
"$CI_BOX_VARIANT_FILE" --profile build-lint up
|
|
--abort-on-container-exit --exit-code-from draupnir-build-lint --build
|
|
draupnir-build-lint
|
|
- name: Collect diagnostics
|
|
if: failure()
|
|
run:
|
|
docker compose -p "$CI_BOX_PROJECT" -f "$CI_BOX_COMPOSE_FILE" -f
|
|
"$CI_BOX_VARIANT_FILE" --profile '*' ps && docker compose -p
|
|
"$CI_BOX_PROJECT" -f "$CI_BOX_COMPOSE_FILE" -f "$CI_BOX_VARIANT_FILE"
|
|
--profile '*' logs --no-color
|
|
- name: Cleanup
|
|
if: always()
|
|
run:
|
|
docker compose -p "$CI_BOX_PROJECT" -f "$CI_BOX_COMPOSE_FILE" -f
|
|
"$CI_BOX_VARIANT_FILE" --profile '*' down --volumes --remove-orphans
|
|
|
|
unit:
|
|
name:
|
|
Unit tests / Node ${{ matrix.node }} / ${{ matrix.variant }} / ${{
|
|
matrix.arch }}
|
|
runs-on: ${{ matrix.runner }}
|
|
continue-on-error: ${{ matrix.node == '26' }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
node: ["24", "26"]
|
|
variant: [slim, alpine]
|
|
arch: [amd64, arm64]
|
|
exclude:
|
|
- node: "26"
|
|
variant: alpine
|
|
arch: arm64
|
|
- node: "26"
|
|
variant: slim
|
|
arch: arm64
|
|
- node: "26"
|
|
variant: slim
|
|
arch: amd64
|
|
include:
|
|
- arch: amd64
|
|
runner: ubuntu-24.04
|
|
- arch: arm64
|
|
runner: ubuntu-24.04-arm
|
|
env:
|
|
CI_BOX_PROJECT:
|
|
ci-in-a-box-node${{ matrix.node }}-${{ matrix.variant }}-${{ matrix.arch
|
|
}}
|
|
CI_BOX_VARIANT_FILE:
|
|
ci-in-a-box/compose.node${{ matrix.node }}-${{ matrix.variant }}.yaml
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
|
|
- name: Validate Compose configuration
|
|
run:
|
|
docker compose -p "$CI_BOX_PROJECT" -f "$CI_BOX_COMPOSE_FILE" -f
|
|
"$CI_BOX_VARIANT_FILE" --profile '*' config --quiet
|
|
- name: Run unit tests
|
|
run:
|
|
docker compose -p "$CI_BOX_PROJECT" -f "$CI_BOX_COMPOSE_FILE" -f
|
|
"$CI_BOX_VARIANT_FILE" --profile unit up --abort-on-container-exit
|
|
--exit-code-from draupnir-unit --build draupnir-unit
|
|
- name: Collect diagnostics
|
|
if: failure()
|
|
run:
|
|
docker compose -p "$CI_BOX_PROJECT" -f "$CI_BOX_COMPOSE_FILE" -f
|
|
"$CI_BOX_VARIANT_FILE" --profile '*' ps && docker compose -p
|
|
"$CI_BOX_PROJECT" -f "$CI_BOX_COMPOSE_FILE" -f "$CI_BOX_VARIANT_FILE"
|
|
--profile '*' logs --no-color
|
|
- name: Cleanup
|
|
if: always()
|
|
run:
|
|
docker compose -p "$CI_BOX_PROJECT" -f "$CI_BOX_COMPOSE_FILE" -f
|
|
"$CI_BOX_VARIANT_FILE" --profile '*' down --volumes --remove-orphans
|
|
|
|
integration:
|
|
name:
|
|
Integration tests / Node ${{ matrix.node }} / ${{ matrix.variant }} / ${{
|
|
matrix.arch }}
|
|
runs-on: ${{ matrix.runner }}
|
|
continue-on-error: ${{ matrix.node == '26' }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
node: ["24", "26"]
|
|
variant: [slim, alpine]
|
|
arch: [amd64, arm64]
|
|
exclude:
|
|
- node: "26"
|
|
variant: alpine
|
|
arch: arm64
|
|
- node: "26"
|
|
variant: slim
|
|
arch: arm64
|
|
- node: "26"
|
|
variant: slim
|
|
arch: amd64
|
|
include:
|
|
- arch: amd64
|
|
runner: ubuntu-24.04
|
|
- arch: arm64
|
|
runner: ubuntu-24.04-arm
|
|
env:
|
|
CI_BOX_PROJECT:
|
|
ci-in-a-box-node${{ matrix.node }}-${{ matrix.variant }}-${{ matrix.arch
|
|
}}
|
|
CI_BOX_VARIANT_FILE:
|
|
ci-in-a-box/compose.node${{ matrix.node }}-${{ matrix.variant }}.yaml
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
|
|
- name: Check out external antispam module
|
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
|
|
with:
|
|
repository: maunium/synapse-http-antispam
|
|
path: synapse-http-antispam
|
|
ref: main
|
|
- name: Validate Compose configuration
|
|
run:
|
|
docker compose -p "$CI_BOX_PROJECT" -f "$CI_BOX_COMPOSE_FILE" -f
|
|
"$CI_BOX_VARIANT_FILE" --profile '*' config --quiet
|
|
- name: Start support stack
|
|
run:
|
|
docker compose -p "$CI_BOX_PROJECT" -f "$CI_BOX_COMPOSE_FILE" -f
|
|
"$CI_BOX_VARIANT_FILE" up -d
|
|
- name: Run integration tests
|
|
run:
|
|
docker compose -p "$CI_BOX_PROJECT" -f "$CI_BOX_COMPOSE_FILE" -f
|
|
"$CI_BOX_VARIANT_FILE" --profile integration up
|
|
--abort-on-container-exit --exit-code-from draupnir-integration
|
|
--build draupnir-integration
|
|
- name: Collect diagnostics
|
|
if: failure()
|
|
run:
|
|
docker compose -p "$CI_BOX_PROJECT" -f "$CI_BOX_COMPOSE_FILE" -f
|
|
"$CI_BOX_VARIANT_FILE" --profile '*' ps && docker compose -p
|
|
"$CI_BOX_PROJECT" -f "$CI_BOX_COMPOSE_FILE" -f "$CI_BOX_VARIANT_FILE"
|
|
--profile '*' logs --no-color
|
|
- name: Cleanup
|
|
if: always()
|
|
run:
|
|
docker compose -p "$CI_BOX_PROJECT" -f "$CI_BOX_COMPOSE_FILE" -f
|
|
"$CI_BOX_VARIANT_FILE" --profile '*' down --volumes --remove-orphans
|
|
|
|
appservice-integration:
|
|
name:
|
|
Application Service Integration tests / Node ${{ matrix.node }} / ${{
|
|
matrix.variant }} / ${{ matrix.arch }}
|
|
runs-on: ${{ matrix.runner }}
|
|
continue-on-error: ${{ matrix.node == '26' }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
node: ["24", "26"]
|
|
variant: [slim, alpine]
|
|
arch: [amd64, arm64]
|
|
exclude:
|
|
- node: "26"
|
|
variant: alpine
|
|
arch: arm64
|
|
- node: "26"
|
|
variant: slim
|
|
arch: arm64
|
|
- node: "26"
|
|
variant: slim
|
|
arch: amd64
|
|
include:
|
|
- arch: amd64
|
|
runner: ubuntu-24.04
|
|
- arch: arm64
|
|
runner: ubuntu-24.04-arm
|
|
env:
|
|
CI_BOX_PROJECT:
|
|
ci-in-a-box-node${{ matrix.node }}-${{ matrix.variant }}-${{ matrix.arch
|
|
}}
|
|
CI_BOX_VARIANT_FILE:
|
|
ci-in-a-box/compose.node${{ matrix.node }}-${{ matrix.variant }}.yaml
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
|
|
- name: Check out external antispam module
|
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
|
|
with:
|
|
repository: maunium/synapse-http-antispam
|
|
path: synapse-http-antispam
|
|
# Main is intentional so we know if compatibility breaks with the latest version of the antispam module.
|
|
# This is for the same reason why Ci is rerun periodically.
|
|
ref: main
|
|
- name: Validate Compose configuration
|
|
run:
|
|
docker compose -p "$CI_BOX_PROJECT" -f "$CI_BOX_COMPOSE_FILE" -f
|
|
"$CI_BOX_VARIANT_FILE" --profile '*' config --quiet
|
|
- name: Start support stack
|
|
run:
|
|
docker compose -p "$CI_BOX_PROJECT" -f "$CI_BOX_COMPOSE_FILE" -f
|
|
"$CI_BOX_VARIANT_FILE" up -d
|
|
- name: Run appservice integration tests
|
|
run:
|
|
docker compose -p "$CI_BOX_PROJECT" -f "$CI_BOX_COMPOSE_FILE" -f
|
|
"$CI_BOX_VARIANT_FILE" --profile appservice-integration up
|
|
--abort-on-container-exit --exit-code-from
|
|
draupnir-appservice-integration --build
|
|
draupnir-appservice-integration
|
|
- name: Collect diagnostics
|
|
if: failure()
|
|
run:
|
|
docker compose -p "$CI_BOX_PROJECT" -f "$CI_BOX_COMPOSE_FILE" -f
|
|
"$CI_BOX_VARIANT_FILE" --profile '*' ps && docker compose -p
|
|
"$CI_BOX_PROJECT" -f "$CI_BOX_COMPOSE_FILE" -f "$CI_BOX_VARIANT_FILE"
|
|
--profile '*' logs --no-color
|
|
- name: Cleanup
|
|
if: always()
|
|
run:
|
|
docker compose -p "$CI_BOX_PROJECT" -f "$CI_BOX_COMPOSE_FILE" -f
|
|
"$CI_BOX_VARIANT_FILE" --profile '*' down --volumes --remove-orphans
|