Skip to content

Bump actions/github-script from 6 to 7 #289

Bump actions/github-script from 6 to 7

Bump actions/github-script from 6 to 7 #289

Workflow file for this run

name: Test code
on:
pull_request:
branches:
- master
- develop
paths:
- src/**
- .github/workflows/**
- "*.sln"
# Upload code coverage results when PRs are merged
push:
branches:
- master
- develop
paths:
- src/**
- .github/workflows/**
env:
DOTNET_NOLOGO: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-latest
- windows-latest
graphqlversion:
- 7.0.2
- 7.1.1
- 7.4.0
steps:
- name: Checkout source
uses: actions/checkout@v3
- name: Setup .NET SDKs
uses: actions/setup-dotnet@v3
with:
dotnet-version: '7.0.x'
source-url: https://nuget.pkg.github.com/graphql-dotnet/index.json
env:
NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Install dependencies with GraphQL version ${{ matrix.graphqlversion }}
run: dotnet restore -p:GraphQLTestVersion=${{ matrix.graphqlversion }}
- name: Build solution [Release]
if: ${{ startsWith(matrix.os, 'ubuntu') }}
run: dotnet build --no-restore -c Release -p:GraphQLTestVersion=${{ matrix.graphqlversion }}
- name: Build solution [Debug]
run: dotnet build --no-restore -c Debug -p:GraphQLTestVersion=${{ matrix.graphqlversion }}
- name: Test solution [Debug]
run: >
dotnet test
--no-build
--collect "XPlat Code Coverage"
--results-directory .coverage
--
DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Format=opencover
DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Exclude=[GraphQL.Relay.StarWars]*,[GraphQL.Relay.Todo]*
- name: Upload coverage to codecov
if: ${{ startsWith(matrix.os, 'ubuntu') }}
uses: codecov/codecov-action@v3
with:
files: '.coverage/**/coverage.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