Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 36 additions & 30 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,37 @@
name: Coverage
name: Coverage

on:
push:
branches: [ "main" ]
pull_request:

env:
CARGO_TERM_COLOR: always

# Least privilege: CI only needs to check out and build; for coverage the codecov
# upload authorizes itself with the CODECOV_TOKEN secret, and for publish the
# registry write is authorized by CARGO_REGISTRY_TOKEN rather than GITHUB_TOKEN.
permissions:
contents: read

on:
push:
branches: [ "main" ]
pull_request:

env:
CARGO_TERM_COLOR: always

jobs:
All:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Get Rust version
id: rust-version
run: echo "rust_version=$(rustc --version)" >> "$GITHUB_OUTPUT"
- name: Run setup
uses: ./.github/actions/setup
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- name: Generate coverage report
run: cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
files: lcov.info
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
jobs:
All:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
- name: Get Rust version
id: rust-version
run: echo "rust_version=$(rustc --version)" >> "$GITHUB_OUTPUT"
- name: Run setup
uses: ./.github/actions/setup
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@94a99045a72830168b8eae8bf767ba08abeca856 # cargo-llvm-cov
- name: Generate coverage report
run: cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info
- name: Upload coverage to Codecov
uses: codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238 # v4
with:
files: lcov.info
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
108 changes: 57 additions & 51 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,52 +1,58 @@
name: Publish
name: Publish

on:
push:
branches: [ "main" ]

# Least privilege: CI only needs to check out and build; for coverage the codecov
# upload authorizes itself with the CODECOV_TOKEN secret, and for publish the
# registry write is authorized by CARGO_REGISTRY_TOKEN rather than GITHUB_TOKEN.
permissions:
contents: read

on:
push:
branches: [ "main" ]

jobs:
All:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Get Rust version
id: rust-version
run: echo "rust_version=$(rustc --version)" >> "$GITHUB_OUTPUT"
- name: Run setup
uses: ./.github/actions/setup
- name: Publish types
run: cargo publish --manifest-path types/Cargo.toml
continue-on-error: true
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
- name: Publish execution
run: cargo publish --manifest-path execution/Cargo.toml
continue-on-error: true
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
- name: Publish simulator
run: cargo publish --manifest-path simulator/Cargo.toml
continue-on-error: true
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
- name: Publish client
run: cargo publish --manifest-path client/Cargo.toml
continue-on-error: true
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
- name: Publish node
run: cargo publish --manifest-path node/Cargo.toml
continue-on-error: true
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
- name: Publish randotron
run: cargo publish --manifest-path randotron/Cargo.toml
continue-on-error: true
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
- name: Publish deployer
run: cargo publish --manifest-path deployer/Cargo.toml
continue-on-error: true
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
jobs:
All:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
- name: Get Rust version
id: rust-version
run: echo "rust_version=$(rustc --version)" >> "$GITHUB_OUTPUT"
- name: Run setup
uses: ./.github/actions/setup
- name: Publish types
run: cargo publish --manifest-path types/Cargo.toml
continue-on-error: true
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
- name: Publish execution
run: cargo publish --manifest-path execution/Cargo.toml
continue-on-error: true
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
- name: Publish simulator
run: cargo publish --manifest-path simulator/Cargo.toml
continue-on-error: true
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
- name: Publish client
run: cargo publish --manifest-path client/Cargo.toml
continue-on-error: true
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
- name: Publish node
run: cargo publish --manifest-path node/Cargo.toml
continue-on-error: true
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
- name: Publish randotron
run: cargo publish --manifest-path randotron/Cargo.toml
continue-on-error: true
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
- name: Publish deployer
run: cargo publish --manifest-path deployer/Cargo.toml
continue-on-error: true
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
206 changes: 106 additions & 100 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,102 +1,108 @@
name: Tests
name: Tests

on:
push:
branches: [ "main" ]
pull_request:

env:
CARGO_TERM_COLOR: always
UDEPS_VERSION: 0.1.57
NIGHTLY_VERSION: nightly-2025-08-10
NODE_VERSION: 20

# Least privilege: CI only needs to check out and build; for coverage the codecov
# upload authorizes itself with the CODECOV_TOKEN secret, and for publish the
# registry write is authorized by CARGO_REGISTRY_TOKEN rather than GITHUB_TOKEN.
permissions:
contents: read

on:
push:
branches: [ "main" ]
pull_request:

env:
CARGO_TERM_COLOR: always
UDEPS_VERSION: 0.1.57
NIGHTLY_VERSION: nightly-2025-08-10
NODE_VERSION: 20

jobs:
All:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Get Rust version
id: rust-version
run: echo "rust_version=$(rustc --version)" >> "$GITHUB_OUTPUT"
- name: Run setup
uses: ./.github/actions/setup
- name: Lint
run: cargo clippy --all-targets --all-features -- -D warnings
- name: Fmt
run: cargo fmt --all -- --check
- name: Check docs
run: cargo doc --no-deps --document-private-items
env:
RUSTDOCFLAGS: "-D warnings"
- name: Run tests
run: cargo test --verbose

Dependencies:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install nightly Rust toolchain
run: rustup toolchain install ${{ env.NIGHTLY_VERSION }}
- name: Get Rust version
id: rust-version
run: echo "rust_version=$(rustc +${{ env.NIGHTLY_VERSION }} --version)" >> "$GITHUB_OUTPUT"
- name: Run setup
uses: ./.github/actions/setup
- name: Cache cargo-udeps
id: cargo-udeps-cache
uses: actions/cache@v4
with:
path: ~/.cargo/bin/cargo-udeps
key: ${{ runner.os }}-${{ env.UDEPS_VERSION }}-cargo-udeps-${{ steps.rust-version.outputs.rust_version }}
- name: Install cargo-udeps
if: steps.cargo-udeps-cache.outputs.cache-hit != 'true'
run: cargo +${{ env.NIGHTLY_VERSION }} install cargo-udeps --version ${{ env.UDEPS_VERSION }}
- name: Check for unused dependencies
run: cargo +${{ env.NIGHTLY_VERSION }} udeps --all-targets

React:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Get Rust version
id: rust-version
run: echo "rust_version=$(rustc --version)" >> "$GITHUB_OUTPUT"
- name: Run setup
uses: ./.github/actions/setup
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'npm'
cache-dependency-path: website/package-lock.json
- name: Install dependencies
run: cd website && npm ci
- name: Test compilation
run: cd website && npm run build
- name: Test website
run: cd website && npm run test

Lock:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Run setup
uses: ./.github/actions/setup
- name: Build entire workspace
run: cargo build --workspace --all-targets
- name: Check Cargo.lock unchanged
run: |
if ! git diff --exit-code Cargo.lock; then
echo "ERROR: Cargo.lock was modified during build!"
echo "This suggests that the Cargo.lock file in the repository is not up to date."
echo "Please run 'cargo build' locally and commit the updated Cargo.lock."
exit 1
fi
jobs:
All:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
- name: Get Rust version
id: rust-version
run: echo "rust_version=$(rustc --version)" >> "$GITHUB_OUTPUT"
- name: Run setup
uses: ./.github/actions/setup
- name: Lint
run: cargo clippy --all-targets --all-features -- -D warnings
- name: Fmt
run: cargo fmt --all -- --check
- name: Check docs
run: cargo doc --no-deps --document-private-items
env:
RUSTDOCFLAGS: "-D warnings"
- name: Run tests
run: cargo test --verbose

Dependencies:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout repository
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
- name: Install nightly Rust toolchain
run: rustup toolchain install ${{ env.NIGHTLY_VERSION }}
- name: Get Rust version
id: rust-version
run: echo "rust_version=$(rustc +${{ env.NIGHTLY_VERSION }} --version)" >> "$GITHUB_OUTPUT"
- name: Run setup
uses: ./.github/actions/setup
- name: Cache cargo-udeps
id: cargo-udeps-cache
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
with:
path: ~/.cargo/bin/cargo-udeps
key: ${{ runner.os }}-${{ env.UDEPS_VERSION }}-cargo-udeps-${{ steps.rust-version.outputs.rust_version }}
- name: Install cargo-udeps
if: steps.cargo-udeps-cache.outputs.cache-hit != 'true'
run: cargo +${{ env.NIGHTLY_VERSION }} install cargo-udeps --version ${{ env.UDEPS_VERSION }}
- name: Check for unused dependencies
run: cargo +${{ env.NIGHTLY_VERSION }} udeps --all-targets

React:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
- name: Get Rust version
id: rust-version
run: echo "rust_version=$(rustc --version)" >> "$GITHUB_OUTPUT"
- name: Run setup
uses: ./.github/actions/setup
- name: Setup Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'npm'
cache-dependency-path: website/package-lock.json
- name: Install dependencies
run: cd website && npm ci
- name: Test compilation
run: cd website && npm run build
- name: Test website
run: cd website && npm run test

Lock:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout repository
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
- name: Run setup
uses: ./.github/actions/setup
- name: Build entire workspace
run: cargo build --workspace --all-targets
- name: Check Cargo.lock unchanged
run: |
if ! git diff --exit-code Cargo.lock; then
echo "ERROR: Cargo.lock was modified during build!"
echo "This suggests that the Cargo.lock file in the repository is not up to date."
echo "Please run 'cargo build' locally and commit the updated Cargo.lock."
exit 1
fi
echo "✓ Cargo.lock remained unchanged after building everything"
Loading