Skip to content

Allow accessing send queue count from WebSocketConnection (#78) #361

Allow accessing send queue count from WebSocketConnection (#78)

Allow accessing send queue count from WebSocketConnection (#78) #361

Workflow file for this run

name: Run code tests
on:
pull_request:
branches:
- master
- develop
push:
branches:
- master
- develop
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-latest
- windows-latest
steps:
- name: Checkout source
uses: actions/checkout@v4
- name: Use .NET Core SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
2.1.x
3.1.x
5.0.x
6.0.x
8.0.x
source-url: https://nuget.pkg.github.com/Shane32/index.json
env:
NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Add graphql-dotnet nuget source
run: dotnet nuget add source https://nuget.pkg.github.com/graphql-dotnet/index.json -n graphqldotnet -u ${{ secrets.NUGET_PUBLIC_USER }} -p ${{ secrets.NUGET_PUBLIC_TOKEN }} --store-password-in-clear-text
continue-on-error: true
- 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
- name: Test solution [Debug]
run: dotnet test --no-restore --no-build -p:CollectCoverage=true -p:CoverletOutputFormat=lcov -p:CoverletOutput=../../${{ matrix.os }}.lcov.info
# ==== code coverage reports (ubuntu-latest only) ====
- name: Convert coverage report to clover & htmlsummary format
if: ${{ matrix.os == 'ubuntu-latest' }}
uses: danielpalme/[email protected]
with:
reports: '${{ matrix.os }}.lcov.net6.0.info'
targetdir: '.'
reporttypes: 'Clover;HtmlSummary'
tag: 'test_${{ github.run_number }}'
- name: Convert coverage report to html
if: ${{ matrix.os == 'ubuntu-latest' }}
uses: danielpalme/[email protected]
with:
reports: '${{ matrix.os }}.lcov.net6.0.info'
targetdir: './cloverreport'
reporttypes: 'Html'
tag: 'test_${{ github.run_number }}'
- name: Upload artifacts
if: ${{ matrix.os == 'ubuntu-latest' }}
uses: actions/upload-artifact@v4
with:
name: Code coverage artifacts
path: |
${{ matrix.os }}.lcov.net6.0.info
Clover.xml
cloverreport/**
summary.html
- name: Monitor coverage
if: ${{ matrix.os == 'ubuntu-latest' && github.event_name == 'pull_request' }}
uses: slavcodev/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
clover_file: "Clover.xml"
threshold_alert: 80
threshold_warning: 90
# https://github.com/marketplace/actions/coveralls-github-action
- name: Upload coverage to Coveralls
if: ${{ matrix.os == 'ubuntu-latest' }}
uses: coverallsapp/[email protected]
with:
github-token: ${{secrets.GITHUB_TOKEN }}
path-to-lcov: ${{ matrix.os }}.lcov.net6.0.info
parallel: true
flag-name: ${{ matrix.os }}
- name: Upload coverage to Codecov
if: ${{ 0 == 1 }}
uses: codecov/codecov-action@v1
with:
file: ${{ matrix.os }}.lcov.info
flags: unittests # optional
name: codecov-umbrella # optional
fail_ci_if_error: true # optional (default = false)
verbose: true # optional (default = false)
finish:
needs: test
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/[email protected]
with:
github-token: ${{ secrets.github_token }}
parallel-finished: true