diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..98a2148 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,37 @@ +name: CI +permissions: + contents: read + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v6 + + - name: Setup .NET + uses: actions/setup-dotnet@v5 + with: + dotnet-version: '8.0.x' + + - name: Restore dependencies + run: dotnet restore src/OctoshiftCLI.sln + + - name: Build + run: dotnet build src/OctoshiftCLI.sln --no-restore --configuration Release + + - name: Run Unit Tests + run: dotnet test src/OctoshiftCLI.Tests/OctoshiftCLI.Tests.csproj --no-build --logger "trx;LogFileName=test-results.trx" + + - name: Upload Test Results + uses: actions/upload-artifact@v6 + with: + name: test-results + path: src/OctoshiftCLI.Tests/TestResults