Skip to content
This repository has been archived by the owner on Dec 12, 2024. It is now read-only.

Commit

Permalink
Add specs-report on CI (#101)
Browse files Browse the repository at this point in the history
* Add specs-report on CI

* rename tbdex swift tests
  • Loading branch information
leordev authored Aug 23, 2024
1 parent 0e23e5d commit 6f72cd5
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 8 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,22 @@ jobs:
run: swift build

- name: Run tests
id: tests
run: swift test --enable-code-coverage

- name: Execute Spec Test Vector Report
if: always() && steps.tests.conclusion != 'skipped'
uses: TBD54566975/sdk-report-runner/.github/actions/specs-report@main
with:
junit-report-paths: tests.xml
spec-path: Tests/tbDEXTestVectors/tbdex-spec
suite-name-regex: tbDEXTestVectors
feature-regex: tbDEXTestVectors(\w+)
vector-regex: test_(\w+)
fail-on-missing-vectors: false
fail-on-failed-test-cases: true
comment-on-pr: true
git-token: ${{ secrets.GITHUB_TOKEN }}

- name: Convert the coverage data
run: llvm-cov export -format="lcov" .build/*-apple-macosx/debug/TbdexPackageTests.xctest/Contents/MacOS/TbdexPackageTests -instr-profile .build/*-apple-macosx/debug/codecov/default.profdata > info.lcov
Expand Down
16 changes: 8 additions & 8 deletions Tests/tbDEXTestVectors/tbDEXTestVectorsProtocol.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ final class tbDEXTestVectorsProtocol: XCTestCase {

// MARK: - Resources

func test_parseOffering() throws {
func test_parse_offering() throws {
let vector = try TestVector<String, Offering>(
fileName: "parse-offering",
subdirectory: vectorSubdirectory
Expand All @@ -23,7 +23,7 @@ final class tbDEXTestVectorsProtocol: XCTestCase {
XCTAssertNoDifference(parsedOffering, vector.output)
}

func test_parseBalance() throws {
func test_parse_balance() throws {
let vector = try TestVector<String, Balance>(
fileName: "parse-balance",
subdirectory: vectorSubdirectory
Expand All @@ -39,7 +39,7 @@ final class tbDEXTestVectorsProtocol: XCTestCase {

// MARK: - Messages

func test_parseClose() throws {
func test_parse_close() throws {
let vector = try TestVector<String, Close>(
fileName: "parse-close",
subdirectory: vectorSubdirectory
Expand All @@ -53,7 +53,7 @@ final class tbDEXTestVectorsProtocol: XCTestCase {
XCTAssertNoDifference(parsedClose, vector.output)
}

func test_parseOrder() throws {
func test_parse_order() throws {
let vector = try TestVector<String, Order>(
fileName: "parse-order",
subdirectory: vectorSubdirectory
Expand All @@ -67,7 +67,7 @@ final class tbDEXTestVectorsProtocol: XCTestCase {
XCTAssertNoDifference(parsedOrder, vector.output)
}

func test_parseOrderStatus() throws {
func test_parse_orderstatus() throws {
let vector = try TestVector<String, OrderStatus>(
fileName: "parse-orderstatus",
subdirectory: vectorSubdirectory
Expand All @@ -81,7 +81,7 @@ final class tbDEXTestVectorsProtocol: XCTestCase {
XCTAssertNoDifference(parsedOrderStatus, vector.output)
}

func test_parseQuote() throws {
func test_parse_quote() throws {
let vector = try TestVector<String, Quote>(
fileName: "parse-quote",
subdirectory: vectorSubdirectory
Expand All @@ -95,7 +95,7 @@ final class tbDEXTestVectorsProtocol: XCTestCase {
XCTAssertNoDifference(parsedQuote, vector.output)
}

func test_parseRfq() throws {
func test_parse_rfq() throws {
let vector = try TestVector<String, RFQ>(
fileName: "parse-rfq",
subdirectory: vectorSubdirectory
Expand All @@ -109,7 +109,7 @@ final class tbDEXTestVectorsProtocol: XCTestCase {
XCTAssertNoDifference(parsedRFQ, vector.output)
}

func test_parseRfqOmitPrivateData() throws {
func test_parse_rfq_omit_private_data() throws {
let vector = try TestVector<String, RFQ>(
fileName: "parse-rfq-omit-private-data",
subdirectory: vectorSubdirectory
Expand Down

0 comments on commit 6f72cd5

Please sign in to comment.