mirror of
https://github.com/ppy/osu-tools.git
synced 2025-06-07 23:07:01 +09:00
47 lines
1.2 KiB
YAML
47 lines
1.2 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
inspect-code:
|
|
name: Code Quality
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Install .NET 8.0.x
|
|
uses: actions/setup-dotnet@v3
|
|
with:
|
|
dotnet-version: "8.0.x"
|
|
|
|
- name: Restore Tools
|
|
run: dotnet tool restore
|
|
|
|
- name: Restore Packages
|
|
run: dotnet restore
|
|
|
|
- name: CodeFileSanity
|
|
run: |
|
|
# TODO: Add ignore filters and GitHub Workflow Command Reporting in CFS. That way we don't have to do this workaround.
|
|
# FIXME: Suppress warnings from templates project
|
|
exit_code=0
|
|
while read -r line; do
|
|
if [[ ! -z "$line" ]]; then
|
|
echo "::error::$line"
|
|
exit_code=1
|
|
fi
|
|
done <<< $(dotnet codefilesanity)
|
|
exit $exit_code
|
|
|
|
- name: InspectCode
|
|
run: dotnet jb inspectcode $(pwd)/osu.Tools.sln --build --output="inspectcodereport.xml" --verbosity=WARN
|
|
|
|
- name: NVika
|
|
run: dotnet nvika parsereport "${{github.workspace}}/inspectcodereport.xml" --treatwarningsaserrors
|