Skip to content

Classify links by source syntax, and expose the label position #60

Classify links by source syntax, and expose the label position

Classify links by source syntax, and expose the label position #60

Workflow file for this run

name: Swift
on: [pull_request]
jobs:
test:
runs-on: macos-15
steps:
- uses: actions/checkout@v4.2.2
- uses: maxim-lobanov/setup-xcode@v1.6.0
with:
xcode-version: '16.4.0'
- name: Run tests
run: swift test --enable-code-coverage
- name: Generate coverage report
run: |
CODECOV_DIR=$(find .build -name 'codecov' -type d | head -1)
xcrun llvm-profdata merge -sparse "$CODECOV_DIR"/*.profraw -o default.profdata
PROFDATA_PATH="default.profdata"
ALL_OBJECT_FILES=$(find .build -name "*.o" -type f)
SOURCE_OBJECT_FILES=$(echo "$ALL_OBJECT_FILES" | grep "MarkdownSyntaxTests.build")
xcrun llvm-cov report -instr-profile $PROFDATA_PATH $SOURCE_OBJECT_FILES
xcrun llvm-cov export -format="lcov" -instr-profile $PROFDATA_PATH $SOURCE_OBJECT_FILES >> lcov.info
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5.4.3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: lcov.info
# Sanitizer runs guard the hand-rolled cmark memory model (see the memory/leak/
# concurrency safety-harness tests). Run after coverage so they don't clobber the
# coverage build's profraw data. GitHub Actions sets CI=true, so the CI-gated
# position test stays skipped here.
- name: Run tests under Address Sanitizer
run: swift test --sanitize=address
- name: Run tests under Thread Sanitizer
run: swift test --sanitize=thread