Skip to content

test: refactor tests #426

test: refactor tests

test: refactor tests #426

Workflow file for this run

name: Swift
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
jobs:
build-linux:
runs-on: ubuntu-latest
container: swiftlang/swift:nightly-6.0-jammy
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: actions/cache@v4
with:
path: .build
key: ${{ runner.os }}-spm-${{ hashFiles('Package.resolved') }}
restore-keys: |
${{ runner.os }}-spm-
- run: swift --version
- run: swift build --build-tests --disable-xctest --enable-code-coverage
- run: swift test --skip-build --disable-xctest --enable-code-coverage --no-parallel
# FIXME: `grep -v 184467440737095` is a workaround for octocov parse error
- run: llvm-cov export --format=lcov .build/debug/zyphyPackageTests.swift-testing --instr-profile .build/debug/codecov/default.profdata --ignore-filename-regex=".build|Tests|TokenizerMacros" | grep -v 184467440737095 > coverage_report.lcov
- uses: k1LoW/octocov-action@v1
lint:
runs-on: ubuntu-latest
container: swiftlang/swift:nightly-6.0-jammy
steps:
- uses: actions/checkout@v4
- run: swift format lint -rs .