Skip to content

Commit

Permalink
ci: avoid building twice
Browse files Browse the repository at this point in the history
Normally, both `swift build` and `swift test` build source code. This is a waste of time. To resolve it, I've changed the CI scripts so that only `swift build` builds source code and `swift test` just runs a test executable.
  • Loading branch information
kkebo committed Jun 11, 2024
1 parent 19d5be0 commit 9119085
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/swift.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ jobs:
restore-keys: |
${{ runner.os }}-spm-
- run: swift --version
- run: swift build
- run: swift test --disable-xctest --enable-code-coverage --no-parallel
- run: swift build --build-tests --disable-xctest
- 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
Expand Down

0 comments on commit 9119085

Please sign in to comment.