Avoid set several times HACachedStates #288
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
env: | |
DEVELOPER_DIR: /Applications/Xcode_15.2.app/Contents/Developer | |
HOMEBREW_NO_INSTALL_CLEANUP: TRUE | |
jobs: | |
lint: | |
runs-on: macos-14 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Dependencies | |
run: brew bundle | |
- name: "Run Linting" | |
run: make lint | |
test: | |
runs-on: macos-14 | |
timeout-minutes: 10 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Dependencies | |
run: brew bundle | |
- name: Run Tests | |
run: make test | |
- name: Generate lcov | |
# https://www.reddit.com/r/swift/comments/hr93xg/code_coverage_for_swiftpm_packages/ | |
run: | | |
BIN_PATH="$(swift build --show-bin-path)" | |
XCTEST_PATH="$(find ${BIN_PATH} -name '*.xctest')" | |
COV_BIN=$XCTEST_PATH | |
if [[ "$OSTYPE" == "darwin"* ]]; then | |
f="$(basename $XCTEST_PATH .xctest)" | |
COV_BIN="${COV_BIN}/Contents/MacOS/$f" | |
fi | |
xcrun llvm-cov export -format="lcov" \ | |
"${COV_BIN}" \ | |
-instr-profile=.build/debug/codecov/default.profdata \ | |
-ignore-filename-regex=".build|Tests"\ > info.lcov | |
- uses: codecov/codecov-action@v4 | |
name: Upload Code Coverage | |
with: | |
file: ./info.lcov | |
token: ${{ secrets.CODECOV_TOKEN }} | |