Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 28 additions & 13 deletions .github/workflows/dotnet-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ env:
SOLUTION_NAME: "./ConsoleProgressBar/ConsoleProgressBar.sln"
PROJECT_PATH: "./ConsoleProgressBar/ConsoleProgressBar/ConsoleProgressBar.csproj"

# set consol column widht so a certain [TextFormatting]-test might not fail
COLUMNS: 120

on:
push:
branches: [ main ]
Expand All @@ -13,6 +16,7 @@ on:

jobs:
build:
name: 'Build (Linux)'
strategy:
matrix:
CONFIGURATION: [Debug, Release]
Expand All @@ -21,10 +25,6 @@ jobs:
# https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on
runs-on: ubuntu-latest

env:
# set consol column widht so a certain [TextFormatting]-test might not fail
COLUMNS: 120

steps:
- uses: actions/checkout@v4

Expand All @@ -33,25 +33,40 @@ jobs:
with:
dotnet-version: '9.0.x'

# DEBUG
#- name: List files
# run: ls -R

- name: Restore dependencies
run: dotnet restore $SOLUTION_NAME
#working-directory: ./ConsoleProgressBar

- name: Build
run: dotnet build $SOLUTION_NAME --no-restore
#working-directory: ./ConsoleProgressBar

unit-tests:
name: 'Unit Tests (Linux)'
needs: build
runs-on: ubuntu-latest

strategy:
matrix:
CONFIGURATION: [Debug, Release]

steps:
- uses: actions/checkout@v4

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '9.0.x'

- name: Restore dependencies
run: dotnet restore $SOLUTION_NAME

- name: Test
run: dotnet test $SOLUTION_NAME --no-build --verbosity normal
run: dotnet test $SOLUTION_NAME --verbosity normal
#working-directory: ./ConsoleProgressBar

pack_and_publish:
nuget-pack-and-publish:
if: github.event_name == 'push'
needs: build
name: 'NuGet Pack and Publish'
needs: unit-tests
runs-on: ubuntu-latest

steps:
Expand Down