Skip to content

Add Zoom host-based routing to prevent cross-user event leakage. #54

Add Zoom host-based routing to prevent cross-user event leakage.

Add Zoom host-based routing to prevent cross-user event leakage. #54

Workflow file for this run

name: CI
on:
pull_request:
push:
branches:
- main
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
jobs:
check:
name: Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Cache cargo registry
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
- name: Check formatting
run: cargo fmt --all -- --check
- name: Run clippy
run: cargo clippy --all-targets --all-features -- -D warnings
- name: Run unit tests
run: cargo test --all-features --bin n8n-unihook
- name: Build release
run: cargo build --release
integration-tests:
name: Integration Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Cache cargo registry
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
# Required to build the custom Zoom trigger node before mounting it into test n8n.
# Node 22 aligns with current n8n engine requirements (>=22).
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "22"
- name: Run integration tests
env:
# Clone URL for the Zoom trigger node when the sibling repo is not present (CI).
ZOOM_NODE_REPO: https://github.com/Traction-Rec/n8n-nodes-unihook-zoom-trigger.git
run: ./scripts/run-integration-tests.sh
# Check if version changed (for release workflow trigger)
version-check:
name: Check Version
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
outputs:
version: ${{ steps.version.outputs.version }}
version_changed: ${{ steps.check.outputs.changed }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get version from Cargo.toml
id: version
run: |
VERSION=$(grep '^version' Cargo.toml | head -1 | sed 's/.*"\(.*\)".*/\1/')
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "Current version: $VERSION"
- name: Check if tag exists
id: check
run: |
VERSION="${{ steps.version.outputs.version }}"
if git rev-parse "v$VERSION" >/dev/null 2>&1; then
echo "Tag v$VERSION already exists"
echo "changed=false" >> $GITHUB_OUTPUT
else
echo "Tag v$VERSION does not exist - will create release"
echo "changed=true" >> $GITHUB_OUTPUT
fi
# Trigger release if version changed
trigger-release:
name: Trigger Release
needs: [check, integration-tests, version-check]
if: needs.version-check.outputs.version_changed == 'true'
uses: ./.github/workflows/release.yml
with:
version: ${{ needs.version-check.outputs.version }}
secrets: inherit