Skip to content

winmd-inspect: reserve frontier names the closure spells but omits #1421

winmd-inspect: reserve frontier names the closure spells but omits

winmd-inspect: reserve frontier names the closure spells but omits #1421

Workflow file for this run

name: coverage
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
permissions:
actions: read
contents: read
concurrency:
group: ${{ format('{0}-{1}', github.workflow, github.ref) }}
cancel-in-progress: true
jobs:
coverage:
runs-on: windows-latest
strategy:
matrix:
include:
- branch: development
tag: DEVELOPMENT-SNAPSHOT-2026-05-04-a
steps:
- uses: compnerd/gha-setup-swift@main
with:
swift-build: ${{ matrix.tag }}
swift-version: ${{ matrix.branch }}
- uses: actions/checkout@v7.0.0
- name: Configure LLVM CAS cache
shell: pwsh
run: |
$path = [IO.Path]::Join("${{ github.workspace }}", ".build", "llvm-cas")
"SWIFT_CAS_PATH=$path" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
$prefix = "llvm-cas-${{ runner.os }}-"
$key = "{0}{1}-{2}" -f $prefix, "${{ matrix.tag }}", "${{ hashFiles('Package.resolved') }}"
"LLVM_CAS_CACHE_PREFIX=$prefix" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
"LLVM_CAS_CACHE_KEY=$key" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- name: Restore LLVM CAS
uses: actions/cache/restore@v5
with:
path: ${{ env.SWIFT_CAS_PATH }}
key: ${{ env.LLVM_CAS_CACHE_KEY }}
- name: Run tests
run: >-
swift test --quiet --disable-xctest --enable-code-coverage
-Xswiftc -explicit-module-build
-Xswiftc -cache-compile-job
-Xswiftc -cas-path
-Xswiftc $env:SWIFT_CAS_PATH
- name: Process Coverage Information
run: |
$bin = swift build --show-bin-path
$objects = Get-ChildItem "$bin" -Include *-test-runner.exe,*Tests.dll -Recurse `
| ForEach-Object { '-object'; $_.FullName }
llvm-cov export -format lcov -ignore-filename-regex '\.build[\\/]' -instr-profile "$bin\codecov\default.profdata" @objects | Set-Content -Encoding ascii -Path coverage.lcov
$ws = $env:GITHUB_WORKSPACE
(Get-Content coverage.lcov) `
| ForEach-Object { $_ -replace [regex]::Escape("$ws\"), '' -replace [regex]::Escape("$ws/"), '' } `
| ForEach-Object { $_ -replace '\\', '/' } `
| Set-Content -Encoding ascii coverage.lcov
# The SQL stack lives in the nested SwiftSQL package, whose tests the root
# `swift test` does not run; cover it through its own package path.
- name: Run SwiftSQL tests
run: >-
swift test --quiet --disable-xctest --enable-code-coverage
--package-path SwiftSQL
-Xswiftc -explicit-module-build
-Xswiftc -cache-compile-job
-Xswiftc -cas-path
-Xswiftc $env:SWIFT_CAS_PATH
- name: Process SwiftSQL Coverage Information
run: |
$bin = swift build --package-path SwiftSQL --show-bin-path
$objects = Get-ChildItem "$bin" -Include *-test-runner.exe,*Tests.dll -Recurse `
| ForEach-Object { '-object'; $_.FullName }
llvm-cov export -format lcov -ignore-filename-regex '\.build[\\/]' -instr-profile "$bin\codecov\default.profdata" @objects | Set-Content -Encoding ascii -Path swiftsql.lcov
$ws = $env:GITHUB_WORKSPACE
(Get-Content swiftsql.lcov) `
| ForEach-Object { $_ -replace [regex]::Escape("$ws\"), '' -replace [regex]::Escape("$ws/"), '' } `
| ForEach-Object { $_ -replace '\\', '/' } `
| Set-Content -Encoding ascii swiftsql.lcov
- uses: codecov/codecov-action@v7.0.0
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: coverage.lcov,swiftsql.lcov