diff --git a/.github/workflows/dotnet-test.yml b/.github/workflows/dotnet-test.yml new file mode 100644 index 0000000..b65ceb6 --- /dev/null +++ b/.github/workflows/dotnet-test.yml @@ -0,0 +1,36 @@ +name: dotnet-test + +# +# Purpose: Run dotnet tests +# + +on: + # Run workflow manually + workflow_dispatch: + + # PR for any branch + pull_request: + + # Staged PR's for any branch + merge_group: + + # push on any branch + push: + +defaults: + run: + shell: bash + working-directory: src + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +jobs: + test: + uses: sbartholomeusz/gh-actions-common/.github/workflows/dotnet-test.yml@main + with: + dotnet_version: '3.1.x' + path: './src/Canary.sln' + os-platform: 'windows-latest' + secrets: inherit diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml deleted file mode 100644 index dc14e96..0000000 --- a/.github/workflows/dotnet.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: dotnet-unit-tests - -on: - push: - branches: [ main ] - pull_request: - branches: [ main ] - -defaults: - run: - working-directory: ./src - -jobs: - build: - - runs-on: windows-latest - - steps: - - uses: actions/checkout@v2 - - name: Setup .NET - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 3.1.x - - name: Clean - run: dotnet clean - - name: Restore dependencies - run: dotnet restore - - name: Build - run: dotnet build --no-restore - - name: Test - run: dotnet test --no-build --verbosity normal