Skip to content

Merge pull request #41 from Vinz1911/develop #33

Merge pull request #41 from Vinz1911/develop

Merge pull request #41 from Vinz1911/develop #33

Workflow file for this run

# This workflow will build a Swift project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-swift
name: Build and Test
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build-and-test:
runs-on: macos-13
steps:
- name: 🛒 Checkout Code
uses: actions/checkout@v3
- name: 📦 Set Xcode Version
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '14.3'
- name: 🛠️ Build and Test with Code Coverage
run: |
swift test --enable-code-coverage
- name: ✍️ Generate Coverage Report
run: |
xcrun llvm-cov export -format="lcov" .build/debug/FusionKitPackageTests.xctest/Contents/MacOS/FusionKitPackageTests -instr-profile .build/debug/codecov/default.profdata > info.lcov
- name: ✅ Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: info.lcov
fail_ci_if_error: true