diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml new file mode 100644 index 0000000..15acdec --- /dev/null +++ b/.gitea/workflows/ci.yml @@ -0,0 +1,35 @@ +name: ci + +on: + push: + pull_request: + +jobs: + build-test: + runs-on: [self-hosted, linux, x64, docker] + steps: + - uses: actions/checkout@v4 + + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: '9.0.x' + + - name: Cache NuGet + uses: actions/cache@v4 + with: + path: ~/.nuget/packages + key: nuget-${{ runner.os }}-${{ hashFiles('**/*.csproj') }} + restore-keys: | + nuget-${{ runner.os }}- + + - name: Restore + run: dotnet restore + + - name: Build (Release) + run: dotnet build --configuration Release --no-restore + + - name: Test + env: + DOTNET_CLI_TELEMETRY_OPTOUT: 1 + run: dotnet test --configuration Release --no-build --logger "trx;LogFileName=test-results.trx"