Skip to content

Use Gherkin to define TCK for UUID and UUri serialization #252

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
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
2 changes: 1 addition & 1 deletion .env.oft-current
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ UP_SPEC_FILE_PATTERNS="up-spec/*.adoc up-spec/*.md up-spec/basics up-spec/up-l1/

# The file patterns that specify this component's resources which contain specification items
# that cover the requirements
COMPONENT_FILE_PATTERNS="*.adoc *.md *.rs .github examples src tests tools"
COMPONENT_FILE_PATTERNS="*.adoc *.md *.rs .github examples features src tests tools"

OFT_FILE_PATTERNS="$UP_SPEC_FILE_PATTERNS $COMPONENT_FILE_PATTERNS"
OFT_TAGS=""
2 changes: 1 addition & 1 deletion .env.oft-latest
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ UP_SPEC_FILE_PATTERNS="up-spec/*.adoc up-spec/*.md up-spec/basics up-spec/up-l1/

# The file patterns that specify this component's resources which contain specification items
# that cover the requirements
COMPONENT_FILE_PATTERNS="*.adoc *.md *.rs .github examples src tests tools"
COMPONENT_FILE_PATTERNS="*.adoc *.md *.rs .github examples features src tests tools"

OFT_FILE_PATTERNS="$UP_SPEC_FILE_PATTERNS $COMPONENT_FILE_PATTERNS"
OFT_TAGS="_,LanguageLibrary"
33 changes: 14 additions & 19 deletions .github/workflows/check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ on:
pull_request:
paths:
- "src/**"
- "tests/**"
- "Cargo.*"
- "build.rs"
- "deny.toml"
Expand Down Expand Up @@ -134,13 +135,11 @@ jobs:
cargo hack check --feature-powerset --no-dev-deps

# [impl->req~up-language-ci-test~1]
nextest:
test:
# Subset of feature-combos, on only one OS - more complete testing in test-featurematrix.yaml
outputs:
test_results_url: ${{ steps.test_results.outputs.artifact-url }}
runs-on: ubuntu-latest
env:
NEXTEST_EXPERIMENTAL_LIBTEST_JSON: 1
strategy:
matrix:
feature-flags: ["", "--no-default-features", "--all-features"]
Expand All @@ -151,28 +150,24 @@ jobs:
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
- uses: Swatinem/rust-cache@v2
# install tool to convert cargo's JSON test output to JUNIT format
- run: |
cargo install cargo2junit
# Using nextest because it's faster than built-in test
- uses: taiki-e/install-action@nextest
- name: Run cargo nextest

- name: Run lib tests
run: |
mkdir -p ${GITHUB_WORKSPACE}/target
RUSTC_BOOTSTRAP=1 cargo test --no-fail-fast --lib ${{ matrix.feature-flags }} -- -Z unstable-options --format junit --report-time > ${GITHUB_WORKSPACE}/target/lib-test-results.xml
- name: Run doc tests
run: |
cargo nextest run ${{ matrix.feature-flags }} --profile ci
- name: Run doctests
RUSTC_BOOTSTRAP=1 cargo test --no-fail-fast --doc ${{ matrix.feature-flags }} -- -Z unstable-options --format junit --report-time > ${GITHUB_WORKSPACE}/target/doc-test-results.xml
- name: Run TCK tests
run: |
# we use tee to let cargo test print to the console
RUSTC_BOOTSTRAP=1 cargo test --doc ${{ matrix.feature-flags }} -- -Z unstable-options --format json --report-time | tee target/doctest-results.json
# write output to same directory as the one used by cargo nextest in order
# to flatten the directory hierarchy when uploading the test results
cat target/doctest-results.json | cargo2junit > target/nextest/ci/doctest-results.xml
# the Cucumber based tests write a results file in JUnit format to "tck-[test_name]-results.xml"
cargo test --no-fail-fast --test 'tck_*' ${{ matrix.feature-flags }} -- --junit-out-folder=${GITHUB_WORKSPACE}/target

- name: Upload all-features test results artifact
id: test_results
if: matrix.feature-flags == '--all-features'
uses: actions/upload-artifact@v4
with:
name: test-results
# this will include the nextest and doctest result files in the archive's root folder
path: target/nextest/ci/*-results.xml
# include all test result files
path: target/*-results.xml
Loading