Skip to content

Update Rust to v1.97.1 (#3599) #6554

Update Rust to v1.97.1 (#3599)

Update Rust to v1.97.1 (#3599) #6554

Workflow file for this run

name: Codecov
on:
workflow_dispatch:
pull_request:
push:
branches:
- main
- release-*
permissions:
contents: read
pull-requests: write
env:
TZ: "Europe/Amsterdam"
jobs:
backend:
name: Backend coverage
runs-on: ubuntu-latest
defaults:
run:
working-directory: backend
env:
CARGO_TERM_COLOR: always
SQLX_OFFLINE: "true"
BINSTALL_DISABLE_TELEMETRY: "true"
# Branch coverage requires Rust nightly: https://github.com/taiki-e/cargo-llvm-cov/issues/8
RUSTUP_TOOLCHAIN: nightly-2026-07-10
steps:
# Free up runner disk space, so that our job has enough space to run
# https://dev.to/mathio/squeezing-disk-space-from-github-actions-runners-an-engineers-guide-3pjg
- name: Free up runner disk space
working-directory: /
run: >
df -h
&&
echo "Freeing up disk space..."
&&
sudo rm -rf
/opt/az
/opt/google
/opt/hostedtoolcache
/opt/microsoft
/usr/lib/google-cloud-sdk
/usr/lib/jvm
/usr/local/.ghcup
/usr/local/julia*
/usr/local/lib/android
/usr/local/share/chromium
/usr/local/share/powershell
/usr/share/dotnet
/usr/share/swift
&&
df -h
- name: Checkout
uses: actions/checkout@v7.0.0
with:
fetch-depth: 0
- name: Setup Rust Nightly
shell: bash
run: rustup toolchain install "$RUSTUP_TOOLCHAIN"
- name: Cargo cache
uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2
with:
workspaces: "backend -> target"
cache-bin: "false"
- name: Install Binstall
uses: cargo-bins/cargo-binstall@732870f031d2fb36309d0deaf36abcc704a7be65 # main
- name: Install cargo-llvm-cov
run: cargo binstall cargo-llvm-cov
- name: Install Nextest
run: cargo binstall cargo-nextest
- name: Run tests with coverage
run: cargo llvm-cov nextest --workspace --branch --profile ci --features embed-typst,airgap-detection --cobertura --output-path ./target/llvm-cov-target/codecov.json
- name: Upload coverage to Codecov
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
with:
token: ${{ secrets.CODECOV_TOKEN }}
name: Backend Nextest Coverage
files: backend/target/llvm-cov-target/codecov.json
disable_search: true
fail_ci_if_error: true
- name: Report disk space
run: df -h
frontend:
name: Frontend coverage
runs-on: ubuntu-latest
defaults:
run:
working-directory: frontend
steps:
- name: Checkout
uses: actions/checkout@v7.0.0
with:
fetch-depth: 0
- name: Setup Node
uses: actions/setup-node@v6.4.0
with:
node-version: 24
package-manager-cache: false
- name: Install pnpm
run: >
npm install --global corepack@latest &&
corepack enable &&
corepack prepare pnpm@latest-11 --activate
- name: Install dependencies
run: pnpm install
- name: Run Vite build to report bundle size
run: pnpm vite build --config vite.config.ts
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- name: Run tests with coverage
run: pnpm vitest run --coverage
env:
CHROMIUM_CHANNEL: chrome
- name: Upload coverage to Codecov
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
with:
token: ${{ secrets.CODECOV_TOKEN }}
name: Frontend Vitest Coverage
files: frontend/coverage/coverage-final.json
disable_search: true
fail_ci_if_error: true