Skip to content

Merge pull request #59 from DynamicsValue/feature/35x-improvements #14

Merge pull request #59 from DynamicsValue/feature/35x-improvements

Merge pull request #59 from DynamicsValue/feature/35x-improvements #14

Workflow file for this run

name: CI-3x
on:
push:
branches: [ 3x-dev ]
paths-ignore:
- 'coverage/**'
- '*.md'
- '*.txt'
env:
dotnet-version: 6.0.407
source-url: "https://nuget.pkg.github.com/${{github.repository_owner}}/index.json"
jobs:
build-netcore:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v2
- name: Setup .NET Core for Actual Source
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ env.dotnet-version }}
- name: Disable local packages feed
run: dotnet nuget disable source "local-packages"
- name: Enable GitHub packages feed
run: dotnet nuget enable source github
- name: Build
run: pwsh ./build.ps1
env:
NUGET_USERNAME: ${{github.repository_owner}}
NUGET_TOKEN: ${{ secrets.PACKAGES_TOKEN }}
build-windows:
strategy:
fail-fast: false
matrix:
configuration: ['FAKE_XRM_EASY_9', 'FAKE_XRM_EASY_365', 'FAKE_XRM_EASY_2016','FAKE_XRM_EASY_2015','FAKE_XRM_EASY_2013']
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET Core for Actual Source
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ env.dotnet-version }}
- name: Disable local packages feed
run: dotnet nuget disable source "local-packages"
- name: Enable GitHub packages feed
run: dotnet nuget enable source github
- name: Build
run: pwsh ./build.ps1 -configuration ${{matrix.configuration}} -targetFrameworks 'all'
env:
NUGET_USERNAME: ${{github.repository_owner}}
NUGET_TOKEN: ${{ secrets.PACKAGES_TOKEN }}
sonar:
needs: build-netcore
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET Core for Actual Source
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ env.dotnet-version }}
- name: Disable local packages feed
run: dotnet nuget disable source "local-packages"
- name: Enable GitHub packages feed
run: dotnet nuget enable source github
- name: Quality Gate
uses: DynamicsValue/[email protected]
with:
buildCommand: dotnet build . --configuration FAKE_XRM_EASY_9 --framework net6.0
testCommand: dotnet test . --configuration FAKE_XRM_EASY_9 --framework net6.0 --verbosity normal --collect:"XPlat code coverage" --settings tests/.runsettings --results-directory ./coverage
projectKey: ${{ secrets.SONAR_PROJECT_KEY }}
projectName: fake-xrm-easy-plugins
sonarOrganisation: ${{ vars.SONAR_ORG_NAME }}
beginArguments: >
/d:sonar.verbose="true"
/d:sonar.qualitygate.wait="true"
/d:sonar.cs.opencover.reportsPaths='"coverage/**/coverage.opencover.xml"'
/d:sonar.coverage.exclusions='"tests/**/**"'
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NUGET_USERNAME: ${{github.repository_owner}}
NUGET_TOKEN: ${{ secrets.PACKAGES_TOKEN }}
pack-push:
needs: [build-netcore, build-windows, sonar]
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET Core for Actual Source
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ env.dotnet-version }}
- name: Disable local packages feed
run: dotnet nuget disable source "local-packages"
- name: Enable GitHub packages feed
run: dotnet nuget enable source github
- name: Build
run: pwsh ./build.ps1 -targetFrameworks 'all'
env:
NUGET_USERNAME: ${{github.repository_owner}}
NUGET_TOKEN: ${{ secrets.PACKAGES_TOKEN }}
- name: Pack Src
run: pwsh ./pack-src.ps1 -targetFrameworks 'all' -versionSuffix "zci.${{ github.head_ref }}${{ github.run_number }}"
env:
NUGET_USERNAME: ${{github.repository_owner}}
NUGET_TOKEN: ${{ secrets.PACKAGES_TOKEN }}
- name: Push Src
run: nuget.exe push .\nupkgs\FakeXrmEasy.Plugins.*.nupkg -Source ${{ env.source-url }}
env:
NUGET_USERNAME: ${{github.repository_owner}}
NUGET_AUTH_TOKEN: ${{ github.token }}
NUGET_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Pack Tests
run: pwsh ./pack-tests.ps1 -targetFrameworks 'all' -versionSuffix "zci.${{ github.head_ref }}${{ github.run_number }}"
env:
NUGET_USERNAME: ${{github.repository_owner}}
NUGET_TOKEN: ${{ secrets.PACKAGES_TOKEN }}
- name: Push Tests
run: nuget.exe push .\nupkgs\FakeXrmEasy.PluginsTests.*.nupkg -Source ${{ env.source-url }}
env:
NUGET_USERNAME: ${{github.repository_owner}}
NUGET_AUTH_TOKEN: ${{ github.token }}
NUGET_TOKEN: ${{ secrets.GITHUB_TOKEN }}