Skip to content

Added basic accuracy and critical hit checks #244

Added basic accuracy and critical hit checks

Added basic accuracy and critical hit checks #244

Workflow file for this run

name: SonarCloud
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build and test
runs-on: self-hosted
env:
BUILD_WRAPPER_OUT_DIR: build_wrapper_output_directory # Directory where build-wrapper output will be placed
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: 'true'
- name: Install sonar-scanner and build-wrapper
run: |
./ci/download-sonar-scanner.ps1
- name: Run build-wrapper
run: ./ci/build_project.ps1
- name: Expand Unity Build Commands
run: |
$location = $( Get-Location )
python ./ci/unity_build_adapter.py --file ${location}/bw-output/build-wrapper-dump.json
- name: Install Python Dependencies
run: ./ci/install_pip_requirements.ps1
- name: Run Tests
run: ./ci/run_tests.ps1
- name: Run sonar-scanner
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: |
./ci/set-sonar-variables.ps1
& $env:SONAR_SCANNER_HOME/bin/sonar-scanner.bat --define sonar.cfamily.build-wrapper-output=bw-output -D sonar.host.url=https://sonarcloud.io -D sonar.cfamily.llvm-cov.reportPath=coverage.txt -D sonar.python.coverage.reportPaths=coverage-reports/*.xml -D sonar.cfamily.threads=4
- name: Archive code coverage results
if: always()
uses: actions/upload-artifact@v3
with:
path: |
coverage.txt
coverage-reports/*.xml
TestResults/*