Skip to content

Commit 7c3bc50

Browse files
committed
Read file patterns and tags for OFT run from env file
1 parent 964e1de commit 7c3bc50

File tree

6 files changed

+71
-48
lines changed

6 files changed

+71
-48
lines changed

.env.oft-current

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Copyright (c) 2025 Contributors to the Eclipse Foundation
2+
#
3+
# See the NOTICE file(s) distributed with this work for additional
4+
# information regarding copyright ownership.
5+
#
6+
# This program and the accompanying materials are made available under the
7+
# terms of the Apache License Version 2.0 which is available at
8+
# https://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# SPDX-License-Identifier: Apache-2.0
11+
12+
# shellcheck disable=SC2148,SC2034
13+
14+
# The file patterns that specify the relevant parts of the uProtocol Specification
15+
# that this component is supposed to implement
16+
UP_SPEC_FILE_PATTERNS="up-spec/*.adoc up-spec/*.md up-spec/basics up-spec/up-l1/cloudevents.adoc up-spec/up-l2/api.adoc"
17+
18+
# The file patterns that specify this component's resources which contain specification items
19+
# that cover the requirements
20+
COMPONENT_FILE_PATTERNS="*.adoc *.md *.rs .github examples src tests tools"
21+
22+
OFT_FILE_PATTERNS="$UP_SPEC_FILE_PATTERNS $COMPONENT_FILE_PATTERNS"
23+
OFT_TAGS=""

.env.oft-latest

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Copyright (c) 2025 Contributors to the Eclipse Foundation
2+
#
3+
# See the NOTICE file(s) distributed with this work for additional
4+
# information regarding copyright ownership.
5+
#
6+
# This program and the accompanying materials are made available under the
7+
# terms of the Apache License Version 2.0 which is available at
8+
# https://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# SPDX-License-Identifier: Apache-2.0
11+
12+
# shellcheck disable=SC2148,SC2034
13+
14+
# The file patterns that specify the relevant parts of the latest uProtocol Specification
15+
# that this component is supposed to implement
16+
UP_SPEC_FILE_PATTERNS="up-spec/*.adoc up-spec/*.md up-spec/basics up-spec/up-l1/README.adoc up-spec/up-l1/cloudevents.adoc up-spec/up-l2/api.adoc"
17+
18+
# The file patterns that specify this component's resources which contain specification items
19+
# that cover the requirements
20+
COMPONENT_FILE_PATTERNS="*.adoc *.md *.rs .github examples src tests tools"
21+
22+
OFT_FILE_PATTERNS="$UP_SPEC_FILE_PATTERNS $COMPONENT_FILE_PATTERNS"
23+
OFT_TAGS="_,LanguageLibrary"

.github/workflows/current-up-spec-compliance.yaml

Lines changed: 0 additions & 39 deletions
This file was deleted.

.github/workflows/latest-up-spec-compatibility.yaml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ env:
3232
CARGO_TERM_COLOR: always
3333

3434
jobs:
35-
up-spec-check:
35+
requirements-tracing:
3636
runs-on: ubuntu-latest
3737
steps:
3838
- uses: actions/checkout@v4
@@ -48,14 +48,20 @@ jobs:
4848
git status
4949
cd "${{ github.workspace }}"
5050
51+
- name: "Determine OpenFastTrace file patterns from .env file"
52+
uses: xom9ikk/[email protected]
53+
with:
54+
mode: "oft-latest"
55+
load-mode: strict
56+
5157
# run OpenFastTrace first because the action will always succeed and produce
5258
# a tracing report
5359
- name: Run OpenFastTrace
5460
id: run-oft
5561
uses: eclipse-uprotocol/ci-cd/.github/actions/run-oft@main
5662
with:
57-
file-patterns: "up-spec/*.adoc up-spec/*.md up-spec/basics up-spec/up-l1/README.adoc up-spec/up-l1/cloudevents.adoc up-spec/up-l2/api.adoc *.adoc *.md *.rs .github examples src tests tools"
58-
tags: "_,LanguageLibrary"
63+
file-patterns: "${{ env.OFT_FILE_PATTERNS }}"
64+
tags: "${{ env.OFT_TAGS_}}"
5965

6066
# now try to build and run the tests which may fail if incomaptible changes
6167
# have been introduced into the uProtocol Core API

.github/workflows/nightly.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,5 +51,7 @@ jobs:
5151
coverage:
5252
uses: eclipse-uprotocol/ci-cd/.github/workflows/rust-coverage.yaml@main
5353

54-
requirements-tracing:
55-
uses: ./.github/workflows/current-up-spec-compliance.yaml
54+
current-spec-compliance:
55+
uses: eclipse-uprotocol/ci-cd/.github/workflows/requirements-tracing.yaml@main
56+
with:
57+
env-file-suffix: "oft-current"

.github/workflows/release.yaml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,10 @@ jobs:
3434
coverage:
3535
uses: eclipse-uprotocol/ci-cd/.github/workflows/rust-coverage.yaml@main
3636

37-
requirements-tracing:
38-
uses: ./.github/workflows/current-up-spec-compliance.yaml
37+
current-spec-compliance:
38+
uses: eclipse-uprotocol/ci-cd/.github/workflows/requirements-tracing.yaml@main
39+
with:
40+
env-file-suffix: "oft-current"
3941

4042
licenses:
4143
# This works off the license declarations in dependent packages/crates, so if these declarations are wrong, this report will contain erroneous information
@@ -53,14 +55,20 @@ jobs:
5355
- check
5456
- check-msrv
5557
- coverage
56-
- requirements-tracing
58+
- current-spec-compliance
5759
- licenses
5860
permissions: write-all
5961
steps:
6062
- uses: actions/checkout@v4
6163
with:
6264
submodules: "recursive"
6365

66+
- name: "Determine uProtocol Specification file patterns from .env file"
67+
uses: xom9ikk/[email protected]
68+
with:
69+
mode: oft-current
70+
load-mode: strict
71+
6472
# License report - we later need the download_url output of the upload step
6573
- name: Download license report
6674
uses: actions/download-artifact@v4
@@ -133,7 +141,7 @@ jobs:
133141
- name: Gather uProtocol Specification documents
134142
shell: bash
135143
run: |
136-
tar cvz --file up-spec.tar.gz ${{ vars.UP_SPEC_OPEN_FAST_TRACE_FILE_PATTERNS }}
144+
tar cvz --file up-spec.tar.gz ${{ env.UP_SPEC_FILE_PATTERNS }}
137145
- name: Upload relevant uProtocol Spec files to release
138146
uses: svenstaro/upload-release-action@v2
139147
id: upload_up_spec

0 commit comments

Comments
 (0)