Skip to content

remove macOS agent

remove macOS agent #22

Workflow file for this run

name: CI .NET Core
on:
push:
branches:
- main
- develop
- release/*
- feature/*
- fix/*
paths-ignore:
- '**/README.md'
- '**/LICENSE'
workflow_dispatch: #to test
jobs:
build:
env:
BUILD_CONFIG: Release
PROJECT_NAME: Magic.AutoMapper
DI_PROJECT_NAME_POSTFIX: Extensions.Microsoft.DependencyInjection
strategy:
matrix:
dotnet-version: ['8.0.x']
agent: ['windows-latest','ubuntu-latest'] #,'macos-latest'
name: Build Start with ${{ matrix.dotnet-version }} on ${{matrix.agent}}
runs-on: ${{matrix.agent}}
steps:
- uses: actions/checkout@v2
- name: Setup .NET Core SDK ${{ matrix.dotnet-version }}
uses: actions/[email protected]
with:
dotnet-version: ${{ matrix.dotnet-version }}
- name: Trace Environment
run: |
echo "Log level: ${{ github.event.inputs.logLevel }}"
echo "Tags: ${{ github.event.inputs.tags }}"
- name: Set env. aux vars
run: |
echo "SOLUTION_NAME=${PROJECT_NAME}.sln">> $GITHUB_ENV
echo "TEST_PROJECT_PATH=tests/${PROJECT_NAME}.UnitTest/${PROJECT_NAME}.UnitTest.csproj" >> $GITHUB_ENV
echo "DI_TEST_PROJECT_PATH=tests/${PROJECT_NAME}.${DI_PROJECT_NAME_POSTFIX}.UnitTest/${PROJECT_NAME}.${DI_PROJECT_NAME_POSTFIX}.UnitTest.csproj" >> $GITHUB_ENV
echo "PROJECT_PATH=src/${PROJECT_NAME}/${PROJECT_NAME}.csproj" >> $GITHUB_ENV
echo "DI_PROJECT_PATH=src/${PROJECT_NAME}.${DI_PROJECT_NAME_POSTFIX}/${PROJECT_NAME}.${DI_PROJECT_NAME_POSTFIX}.csproj" >> $GITHUB_ENV
- name: Install dependencies
run: dotnet restore $SOLUTION_NAME
- name: Test - [UnitTest $TEST_PROJECT_PATH]
run: dotnet test $TEST_PROJECT_PATH --no-restore --verbosity normal
- name: Test - [UnitTest $DI_TEST_PROJECT_PATH]
run: dotnet test $DI_TEST_PROJECT_PATH --no-restore --verbosity normal
- name: Build - [$PROJECT_PATH]
run: dotnet build $PROJECT_PATH --configuration ${{ env.BUILD_CONFIG }} --no-restore
- name: Build - [$DI_PROJECT_PATH]
run: dotnet build $DI_PROJECT_PATH --configuration ${{ env.BUILD_CONFIG }} --no-restore
- name: dotnet pack [$PROJECT_NAME] & [$DI_PROJECT_PATH]
run: |
dotnet pack $PROJECT_PATH -c ${{ env.BUILD_CONFIG }} --include-symbols -p:SymbolPackageFormat=snupkg -o ./artifacts
dotnet pack $DI_PROJECT_PATH -c ${{ env.BUILD_CONFIG }} --include-symbols -p:SymbolPackageFormat=snupkg -o ./artifacts