diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ee29845..72f9968 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,17 +1,21 @@ name: build-and-test on: - pull_request: + workflow_dispatch: push: branches: - main + pull_request: concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true +permissions: + contents: read + env: + DOTNET_CLI_TELEMETRY_OPTOUT: 1 DOTNET_NOLOGO: true - DOTNET_CLI_TELEMETRY_OPTOUT: true jobs: build-and-test: @@ -22,29 +26,35 @@ jobs: os: [ubuntu-latest, windows-latest, macos-latest] runs-on: ${{ matrix.os }} steps: + - name: Setup .NET - uses: actions/setup-dotnet@v5 + uses: actions/setup-dotnet@v6 with: dotnet-version: | 10.0.* + - name: Git checkout Schema - uses: actions/checkout@v6 + uses: actions/checkout@v7 with: path: Schema persist-credentials: false + - name: Git checkout Steeltoe - uses: actions/checkout@v6 + uses: actions/checkout@v7 with: repository: SteeltoeOSS/Steeltoe path: Steeltoe ref: main persist-credentials: false + - name: Restore packages run: | dotnet restore Schema + - name: Build solution run: | dotnet build Schema --no-restore --configuration Release + - name: Test run: | dotnet test Schema --no-build --configuration Release