Skip to content

Upgrade and clean up. #42

Upgrade and clean up.

Upgrade and clean up. #42

name: build
on:
push:
branches: [ main ]
paths:
- '**.cs'
- '**.csproj'
workflow_dispatch:
inputs:
reason:
description: 'The reason for running a build?'
required: true
default: 'Manual build'
env:
DOTNET_VERSION: '8.0.x' # set this to the dot net version to use
jobs:
build:
name: build-${{matrix.os}}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
steps:
- uses: actions/checkout@main
- name: 'Print manual build reason'
if: ${{ github.event_name == 'workflow_dispatch' }}
run: |
echo 'Reason: ${{ github.event.inputs.reason }}'
- name: Setup .NET
uses: actions/setup-dotnet@main
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Install dependencies
run: |
dotnet restore ./src/HaveIBeenPwned.Client.Abstractions/HaveIBeenPwned.Client.Abstractions.csproj
dotnet restore ./src/HaveIBeenPwned.Client/HaveIBeenPwned.Client.csproj
dotnet restore ./src/HaveIBeenPwned.Client.PollyExtensions/HaveIBeenPwned.Client.PollyExtensions.csproj
- name: Build
run: |
dotnet build ./src/HaveIBeenPwned.Client.Abstractions/HaveIBeenPwned.Client.Abstractions.csproj --configuration Release --no-restore
dotnet build ./src/HaveIBeenPwned.Client/HaveIBeenPwned.Client.csproj --configuration Release --no-restore
dotnet build ./src/HaveIBeenPwned.Client.PollyExtensions/HaveIBeenPwned.Client.PollyExtensions.csproj --configuration Release --no-restore
- name: Test
run: dotnet test --filter "Category!=AcceptanceTests"