Skip to content

Commit

Permalink
Merge tag '6.0.0' into sc
Browse files Browse the repository at this point in the history
- Add support for setting an expiry time on a webhook. See the documentation on [Generic Webhooks](https://matrix-org.github.io/matrix-hookshot/latest/setup/webhooks.html) for more information. ([\matrix-org#984](matrix-org#984))
- Support for E2E Encrypted rooms is now considered stable and can be enabled in production. Please see the [documentation](https://matrix-org.github.io/matrix-hookshot/latest/advanced/encryption.html)
  on the requirements for enabling support. ([\matrix-org#989](matrix-org#989))

- Fix Challenge Hound activities being duplicated if the cache layer (e.g Redis) goes away. ([\matrix-org#982](matrix-org#982))

- Drop support for Node 20 and start supporting Node 22, 23. ([\matrix-org#990](matrix-org#990))

- Reduce bundle size of widget. ([\matrix-org#985](matrix-org#985))
- Don't invoke newsfile CI check for dependabot. ([\matrix-org#987](matrix-org#987))
- Add devenv development files. ([\matrix-org#993](matrix-org#993))
- Push Docker images to ghcr.io, and and build an image on each commit. ([\matrix-org#994](matrix-org#994))
- Retry e2e tests in CI due to container creation flakiness. ([\matrix-org#995](matrix-org#995))
- Update matrix-bot-sdk to pull in new matrix-rust-sdk. ([\matrix-org#996](matrix-org#996))
  • Loading branch information
SpiritCroc committed Nov 29, 2024
2 parents 2848bbc + 52eeb0b commit 3800c7b
Show file tree
Hide file tree
Showing 169 changed files with 8,320 additions and 3,569 deletions.
3 changes: 3 additions & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
source_url "https://raw.githubusercontent.com/cachix/devenv/95f329d49a8a5289d31e0982652f7058a189bfca/direnvrc" "sha256-d+8cBpDfDBj41inrADaJt+bDWhOktwslgoP5YiGJ1v0="

use devenv
60 changes: 0 additions & 60 deletions .eslintrc.js

This file was deleted.

25 changes: 25 additions & 0 deletions .github/workflows/devenv.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Devenv

on:
push:
branches: [ main ]
paths:
- "/devenv*"
pull_request:
branches: [ main ]
paths:
- "/devenv*"

jobs:
test-nix-env:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v26
- uses: cachix/cachix-action@v14
with:
name: devenv
- name: Install devenv.sh
run: nix profile install nixpkgs#devenv
- name: Build the devenv shell and run any git hooks
run: devenv test
56 changes: 0 additions & 56 deletions .github/workflows/docker-hub-latest.yml

This file was deleted.

47 changes: 0 additions & 47 deletions .github/workflows/docker-hub-release.yml

This file was deleted.

84 changes: 84 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
# Based on https://github.com/matrix-org/dendrite/blob/master/.github/workflows/docker-hub.yml

name: "Docker"

on:
push:
paths-ignore:
- changelog.d/**'
pull_request:
branches: [ main ]
paths-ignore:
- changelog.d/**'
release:
types: [published]

merge_group:


concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false

env:
DOCKER_NAMESPACE: halfshot
PLATFORMS: linux/amd64
PLATFORMS_PUSH: linux/amd64,linux/arm64
# Only push if this is main, otherwise we just want to build
BUILD_FOR_ALL_PLATFORMS: ${{ github.ref == 'refs/heads/main' }}

jobs:
docker-latest:
runs-on: ubuntu-latest

permissions:
contents: read
packages: write
attestations: write
id-token: write

steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}
- name: Log in to the GitHub Container registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
tags: |
type=semver,pattern={{version}}
type=ref,event=branch
type=ref,event=pr
type=raw,value=latest,enable={{is_default_branch}}
images: |
${{ env.DOCKER_NAMESPACE }}/matrix-hookshot
ghcr.io/matrix-org/matrix-hookshot
- name: Build and push Docker images
id: push
uses: docker/build-push-action@v6
with:
context: .
# arm64 builds OOM without the git fetch setting. c.f.
# https://github.com/rust-lang/cargo/issues/10583
build-args: |
CARGO_NET_GIT_FETCH_WITH_CLI=true
platforms: ${{ (env.BUILD_FOR_ALL_PLATFORMS == 'true' && env.PLATFORMS_PUSH) || env.PLATFORMS }}
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
30 changes: 17 additions & 13 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
profile: minimal
components: rustfmt
- run: cargo fmt --all -- --check
- run: cargo clippy -- -Dwarnings
Expand Down Expand Up @@ -66,23 +65,22 @@ jobs:

test:
# Test on LTS-1
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
strategy:
matrix:
node_version: [20, 21]
node_version: [22, 23]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node_version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node_version }}
- uses: actions-rs/toolchain@v1
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
profile: minimal
- uses: Swatinem/rust-cache@v2
with:
shared-key: rust-cache
shared-key: ubuntu-2204-rust-cache
- run: yarn
- run: yarn test:cover

Expand All @@ -92,15 +90,15 @@ jobs:
homerunnersha: ${{ steps.gitsha.outputs.sha }}
steps:
- name: Checkout matrix-org/complement
uses: actions/checkout@v3
uses: actions/checkout@v4
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
uses: actions/cache@v4
with:
path: homerunner
key: ${{ runner.os }}-homerunner-${{ steps.gitsha.outputs.sha }}
Expand All @@ -125,23 +123,28 @@ jobs:
needs:
- test
- build-homerunner
services:
redis:
image: redis
ports:
- 6379:6379
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
uses: actions/cache@v4
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 matrix-hookshot
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: matrix-hookshot
# Setup node & run tests
- name: Use Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version-file: matrix-hookshot/.node-version
- uses: Swatinem/rust-cache@v2
Expand All @@ -152,8 +155,9 @@ jobs:
timeout-minutes: 10
env:
HOMERUNNER_SPAWN_HS_TIMEOUT_SECS: 100
HOMERUNNER_IMAGE: ghcr.io/element-hq/synapse/complement-synapse:latest
HOMERUNNER_IMAGE: ghcr.io/element-hq/synapse/complement-synapse:nightly
NODE_OPTIONS: --dns-result-order ipv4first
REDIS_DATABASE_URI: "redis://localhost:6379"
run: |
docker pull $HOMERUNNER_IMAGE
cd matrix-hookshot
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/newsfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ on:
jobs:
changelog:
runs-on: ubuntu-latest
# No newsfile required for dependabot
if: ${{ github.actor != 'dependabot[bot]' }}
steps:
- uses: actions/checkout@v3
with: # Needed for comparison
Expand Down
Loading

0 comments on commit 3800c7b

Please sign in to comment.