Skip to content

Add more APIs (#4)

Add more APIs (#4) #16

name: Build and Test
on:
push:
branches:
- main
paths-ignore:
- 'README.md'
- 'LICENSE'
- '.github/workflows/documentation.yml'
pull_request:
branches:
- main
paths-ignore:
- 'README.md'
- 'LICENSE'
- '.github/workflows/documentation.yml'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build and Test
runs-on: macos-13
env:
PACKAGE_NAME: Stubby
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Build
run: swift build
- name: Test
run: swift test --enable-code-coverage
- name: Prepare Code Coverage
run: xcrun llvm-cov export --ignore-filename-regex='(Tests)[/\\].*' -format="lcov" .build/debug/${{ env.PACKAGE_NAME }}PackageTests.xctest/Contents/MacOS/${{ env.PACKAGE_NAME }}PackageTests -instr-profile .build/debug/codecov/default.profdata > info.lcov
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
fail_ci_if_error: true