Skip to content

Merge pull request #21 from Mastercard/feature/add-encryption-key-fin… #840

Merge pull request #21 from Mastercard/feature/add-encryption-key-fin…

Merge pull request #21 from Mastercard/feature/add-encryption-key-fin… #840

Workflow file for this run

name: Build & Test
'on':
push:
branches:
- "**"
pull_request:
branches:
- "**"
schedule:
- cron: 0 16 * * *
workflow_dispatch:
jobs:
build:
env:
NETCORE2_TEST_PROJECT: >-
Mastercard.Developer.ClientEncryption.Tests/NetCore2/Mastercard.Developer.ClientEncryption.Tests.NetCore2.csproj
NETCORE3_TEST_PROJECT: >-
Mastercard.Developer.ClientEncryption.Tests/NetCore3/Mastercard.Developer.ClientEncryption.Tests.NetCore3.csproj
NET5_TEST_PROJECT: >-
Mastercard.Developer.ClientEncryption.Tests/Net5/Mastercard.Developer.ClientEncryption.Tests.Net5.csproj
runs-on: ubuntu-latest
strategy:
matrix:
dotnet:
- 2.1.700
- 2.1
- 2.2
- 3.1.x
- 5.0.x
include:
- dotnet: 2.1.700
mono: none
TEST_PROJECT: $NETCORE2_TEST_PROJECT
- dotnet: 2.1
mono: none
TEST_PROJECT: $NETCORE2_TEST_PROJECT
- dotnet: 2.2
mono: none
TEST_PROJECT: $NETCORE2_TEST_PROJECT
- dotnet: 3.1.x
mono: none
TEST_PROJECT: $NETCORE3_TEST_PROJECT
- dotnet: 5.0.x
mono: none
TEST_PROJECT: $NET5_TEST_PROJECT
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup .NET 6
uses: actions/[email protected]
with:
dotnet-version: 6.0.x
- name: Build using .NET 6
run: >
export PATH="$PATH:$HOME/.dotnet/tools"
dotnet build ${{ env.NETCORE2_TEST_PROJECT }} -c Release
dotnet build ${{ env.NETCORE3_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 Release
-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 Release