Skip to content

Fix for NullReferenceException when GetService<IHttpClientFactory>() fails #94

Fix for NullReferenceException when GetService<IHttpClientFactory>() fails

Fix for NullReferenceException when GetService<IHttpClientFactory>() fails #94

Workflow file for this run

name: build
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout!
uses: actions/checkout@v3
- name: Setup .NET 6
uses: actions/setup-dotnet@v3
with:
dotnet-version: '6.0'
- name: Setup .NET 7
uses: actions/setup-dotnet@v3
with:
dotnet-version: '7.0'
- name: Build and run tests.
run: dotnet test --collect:"XPlat Code Coverage"
- name: Make artifacts directory.
run: mkdir -p artifacts
- name: Copy artifacts.
run: |
find . -type f -name AspNetCore.Proxy.dll -exec cp '{}' ./artifacts/. ';'
find . -type f -name AspNetCore.Proxy.pdb -exec cp '{}' ./artifacts/. ';'
find . -type f -name AspNetCore.Proxy.xml -exec cp '{}' ./artifacts/. ';'
find . -type f -name coverage.cobertura.xml -exec cp '{}' ./artifacts/. ';'
- name: Upload artifacts.
uses: actions/upload-artifact@master
with:
name: artifacts
path: artifacts
- name: Upload code coverage to codecov.io.
uses: codecov/codecov-action@v3
with:
token: ${{secrets.CODECOV_KEY}}
file: ./artifacts/coverage.cobertura.xml