Skip to content

Hermes Tests

Hermes Tests #200

Workflow file for this run

# Copyright 2026 The Fuchsia Authors
#
# Licensed under a BSD-style license <LICENSE-BSD>, Apache License, Version 2.0
# <LICENSE-APACHE or https://www.apache.org/licenses/LICENSE-2.0>, or the MIT
# license <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your option.
# This file may not be copied, modified, or distributed except according to
# those terms.
name: Hermes Tests
on:
pull_request:
merge_group:
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: -Dwarnings
RUSTDOCFLAGS: -Dwarnings
CARGO_ZEROCOPY_AUTO_INSTALL_TOOLCHAIN: 1
jobs:
hermes_tests:
name: Hermes Tests
runs-on: ubuntu-24.04-64core
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3
- name: Build and cache Docker image
uses: docker/build-push-action@ca052bb54ab0790a636c9b5f226502c73d547a25 # v5
with:
context: tools
file: tools/hermes/Dockerfile
target: base
load: true
tags: hermes-ci:local
cache-from: type=gha
cache-to: type=gha,mode=max
# Run unit tests separately, as they're much less likely to have bugs
# during local development, and this makes the GitHub Actions output
# easier to skim (in particular, it's clear at a glance whether a failure
# is due to unit or integration tests).
- name: Run unit tests
run: docker run --rm -v $GITHUB_WORKSPACE/tools:/workspace hermes-ci:local cargo test --verbose --bin cargo-hermes
# We duplicate running unit tests since they're very cheap compared to
# integration tests, and this way it's easier to be sure that we run all
# tests instead of specifically trying to carve out unit tests and risk
# missing test categories.
- name: Run all tests
run: docker run --rm -v $GITHUB_WORKSPACE/tools:/workspace hermes-ci:local cargo test --verbose
# Used to signal to branch protections that all other jobs have succeeded.
all-jobs-succeed:
# WARNING: This name is load-bearing! It's how GitHub's settings UI configures which jobs
# to block on. DO NOT change this name without updating the settings UI to match.
name: All checks succeeded (hermes.yml)
# On failure, we run and unconditionally exit with a failing status code.
# On success, this job is skipped. Jobs skipped using `if:` are considered
# to have succeeded:
#
# https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/collaborating-on-repositories-with-code-quality-features/troubleshooting-required-status-checks#handling-skipped-but-required-checks
if: failure()
runs-on: ubuntu-latest
needs: [hermes_tests]
steps:
- name: Mark the job as failed
run: exit 1