Build & Test #1208
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: Build & Test | |
'on': | |
push: | |
branches: | |
- "**" | |
pull_request: | |
branches: | |
- "**" | |
schedule: | |
- cron: 0 16 * * * | |
workflow_dispatch: | |
jobs: | |
build: | |
env: | |
NET_TEST_PROJECT: >- | |
Mastercard.Developer.ClientEncryption.Tests/Mastercard.Developer.ClientEncryption.Tests.csproj | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
dotnet: | |
- 5.0.x | |
include: | |
- dotnet: 5.0.x | |
mono: none | |
TEST_PROJECT: $NETCORE_TEST_PROJECT | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Setup .NET 5 | |
uses: actions/[email protected] | |
with: | |
dotnet-version: 5.0.x | |
- name: Build using .NET 5 | |
run: > | |
export PATH="$PATH:$HOME/.dotnet/tools" | |
dotnet build ${{ env.NETCORE_TEST_PROJECT }} -c Release | |
- name: Setup .NET [Core] ${{ matrix.dotnet }} | |
uses: actions/[email protected] | |
with: | |
dotnet-version: '${{ matrix.dotnet }}' | |
- name: List .NET SDKs | |
run: > | |
dotnet --list-sdks | |
- name: Run tests using .NET [Core] ${{ matrix.dotnet }} | |
run: > | |
export PATH="$PATH:$HOME/.dotnet/tools" | |
dotnet test ${{ matrix.TEST_PROJECT }} -c Debug | |
-l:"trx;LogFileName=tests.trx" -r:"bin/" /p:CollectCoverage=true | |
/p:CoverletOutputFormat="opencover" | |
/p:CoverletOutput="bin/coverage.xml" | |
- name: Local publish | |
run: > | |
dotnet publish ${{ matrix.TEST_PROJECT }} -c Debug |