diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index c3d034d..0ab8265 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -3,25 +3,19 @@ "isRoot": true, "tools": { "CodeFileSanity": { - "version": "0.0.36", + "version": "0.0.37", "commands": [ "CodeFileSanity" ] }, - "dotnet-format": { - "version": "3.1.37601", - "commands": [ - "dotnet-format" - ] - }, "jetbrains.resharper.globaltools": { - "version": "2020.3.2", + "version": "2023.3.3", "commands": [ "jb" ] }, "nvika": { - "version": "2.0.0", + "version": "3.0.0", "commands": [ "nvika" ] diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..d9dcdd9 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,43 @@ +on: [push, pull_request] +name: Continuous Integration +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + inspect-code: + name: Code Quality + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Install .NET 8.0.x + uses: actions/setup-dotnet@v4 + 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.Server.DifficultyCalculator.sln --build --output="inspectcodereport.xml" --caches-home="inspectcode" --verbosity=WARN + + - name: NVika + run: dotnet nvika parsereport "${{github.workspace}}/inspectcodereport.xml" --treatwarningsaserrors diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index c6856cb..0000000 --- a/appveyor.yml +++ /dev/null @@ -1,14 +0,0 @@ -clone_depth: 1 -version: '{branch}-{build}' -image: Visual Studio 2022 -test: off - -environment: - APPVEYOR: true - -build_script: - - cmd: dotnet tool restore - - cmd: dotnet build osu.Server.DifficultyCalculator.sln -c:Release - - cmd: dotnet CodeFileSanity - - cmd: dotnet jb inspectcode "osu.Server.DifficultyCalculator.sln" --output="temp/inspectcodereport.xml" --caches-home="temp/inspectcode" --verbosity=WARN - - cmd: dotnet nvika parsereport "temp/inspectcodereport.xml" --treatwarningsaserrors diff --git a/osu.Server.DifficultyCalculator.sln.DotSettings b/osu.Server.DifficultyCalculator.sln.DotSettings index ad0cc9d..3ca27d8 100644 --- a/osu.Server.DifficultyCalculator.sln.DotSettings +++ b/osu.Server.DifficultyCalculator.sln.DotSettings @@ -143,6 +143,7 @@ WARNING WARNING WARNING + SUGGESTION WARNING WARNING WARNING