chore: added LICENSE.md #32
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: "Test & Coverage" | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
types: [opened, synchronize, reopened] | |
jobs: | |
cancel_previous: | |
name: "Cancel previous Tests & Coverage" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: styfle/[email protected] | |
with: | |
workflow_id: ${{ github.event.workflow.id }} | |
build: | |
name: 'Tests & Coverage' | |
needs: cancel_previous | |
runs-on: macos-latest | |
env: | |
BUILD_WRAPPER_OUT_DIR: build_wrapper_output_directory | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install sonar-scanner and build-wrapper | |
uses: SonarSource/sonarcloud-github-c-cpp@v2 | |
- name: Install xcpretty | |
run: gem install xcpretty | |
- name: Run tests(iOS) | |
run: | | |
xcodebuild -project FindingFalcone.xcodeproj -scheme FindingFalconeTests test -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 14' -enableCodeCoverage YES -derivedDataPath build | xcpretty | |
- name: Collect coverage into one XML report | |
run: | | |
bash Scripts/xccov-to-generic.sh build/Logs/Test/*.xcresult/ > generic-coverage.xml | |
- name: SonarCloud Scan | |
env: | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
run: | | |
sonar-scanner -Dsonar.host.url=https://sonarcloud.io |