Skip to content

Make run-oft Action more flexible #19

Make run-oft Action more flexible

Make run-oft Action more flexible #19

# ********************************************************************************
# Copyright (c) 2024 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
#
# This program and the accompanying materials are made available under the
# terms of the Apache License Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0
#
# SPDX-License-Identifier: Apache-2.0
# *******************************************************************************/
# Perform requirements tracing against the uProtocol Specification using OpenFastTrace (https://github.com/itsallcode/openfasttrace)
# Upload tracing report for potential re-use in publication workflow, returns the corresponding download URL as an output on workflow_call
name: Requirements tracing
on:
workflow_call:
inputs:
oft-file-patterns:
description: |
A whitespace separated list of glob patterns which specify the files to include in the OFT trace run.
If not specified, defaults to all files relevant for checking up-rust against the uProtocol Specification.
type: string
outputs:
tracing_report_url:
description: 'URL of the requirements tracing report'
value: ${{ jobs.tracing.outputs.requirements-tracing-report-url }}
workflow_dispatch:
pull_request:
jobs:
tracing:
name: Run OpenFastTrace
runs-on: ubuntu-latest
outputs:
requirements-tracing-report-url: ${{ steps.run-oft.outputs.requirements-tracing-report-url }}
steps:
- uses: actions/checkout@v4
with:
submodules: "recursive"
- name: Run OpenFastTrace
id: run-oft
uses: ./.github/actions/run-oft
with:
file-patterns: ${{ inputs.oft-file-patterns || '*.md *.rs .github examples src tests tools up-spec/*.adoc up-spec/*.md up-spec/basics up-spec/up-l2/api.adoc' }}
- name: "Determine exit code"
run: |
exit ${{ steps.run-oft.outputs.requirements-tracing-exit-code }}