Remove GraphiQL Explorer; fix headers property #1896
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Run code tests | |
on: | |
pull_request: | |
branches: | |
- master | |
- develop | |
paths: | |
- src/** | |
- tests/** | |
- samples/** | |
- .github/workflows/** | |
- "*.props" | |
- "*.targets" | |
- "*.sln" | |
# Upload code coverage results when PRs are merged | |
push: | |
branches: | |
- master | |
- develop | |
paths: | |
- src/** | |
- tests/** | |
- samples/** | |
- .github/workflows/** | |
- "*.props" | |
- "*.targets" | |
env: | |
DOTNET_NOLOGO: true | |
DOTNET_CLI_TELEMETRY_OPTOUT: true | |
jobs: | |
test: | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest] | |
name: ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout source | |
uses: actions/checkout@v4 | |
- name: Setup .NET SDK | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: | | |
2.1.x | |
3.1.x | |
5.0.x | |
6.0.x | |
7.0.x | |
8.0.x | |
source-url: https://nuget.pkg.github.com/graphql-dotnet/index.json | |
env: | |
NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
- name: Install dependencies | |
run: dotnet restore | |
- name: Build solution [Release] | |
run: dotnet build --no-restore -c Release | |
- name: Build solution [Debug] | |
run: dotnet build --no-restore -c Debug | |
- name: Test solution [Debug] with code coverage | |
if: ${{ startsWith(matrix.os, 'ubuntu') }} | |
run: dotnet test --no-restore --no-build -p:CollectCoverage=true | |
- name: Test solution [Debug] without code coverage | |
if: ${{ startsWith(matrix.os, 'windows') }} | |
run: dotnet test --no-restore --no-build | |
- name: Upload coverage to codecov | |
if: ${{ startsWith(matrix.os, 'ubuntu') }} | |
uses: codecov/codecov-action@v5 | |
with: | |
files: .coverage/GraphQL.Server.Transports.AspNetCore.Tests/coverage.net7.0.opencover.xml,.coverage/GraphQL.Server.Transports.AspNetCore.Tests/coverage.netcoreapp2.1.opencover.xml,.coverage/GraphQL.Server.Samples.Server.Tests/coverage.net7.0.opencover.xml | |
buildcheck: | |
needs: | |
- test | |
runs-on: ubuntu-latest | |
if: always() | |
steps: | |
- name: Pass build check | |
if: ${{ needs.test.result == 'success' }} | |
run: exit 0 | |
- name: Fail build check | |
if: ${{ needs.test.result != 'success' }} | |
run: exit 1 |