You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
1.1 KiB
38 lines
1.1 KiB
name: Test |
|
|
|
on: |
|
workflow_dispatch: |
|
push: |
|
branches: |
|
- "main" |
|
pull_request: |
|
|
|
jobs: |
|
test: |
|
name: Run tests |
|
if: ${{ startsWith(github.head_ref, 'version_bump_') == false }} |
|
runs-on: ubuntu-22.04 |
|
|
|
steps: |
|
- name: Check out repo |
|
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 |
|
|
|
- name: Set up .NET |
|
uses: actions/setup-dotnet@4d6c8fcf3c8f7a60068d26b594648e99df24cee3 # v4.0.0 |
|
|
|
- name: Test solution |
|
run: dotnet test --configuration Debug --logger "trx;LogFileName=test-results.trx" /p:CoverletOutputFormatter="cobertura" --collect:"XPlat Code Coverage" |
|
|
|
- name: Report test results |
|
uses: dorny/test-reporter@31a54ee7ebcacc03a09ea97a7e5465a47b84aea5 # v1.9.1 |
|
if: always() |
|
with: |
|
name: Test Results |
|
path: "**/test-results.trx" |
|
reporter: dotnet-trx |
|
fail-on-error: true |
|
|
|
- name: Upload to codecov.io |
|
uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 # v4.5.0 |
|
env: |
|
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
|
|