mirror of
https://github.com/krahets/hello-algo.git
synced 2024-12-27 15:26:29 +08:00
56b20eff36
* .net 8.0 migration * update docs * revert change * revert change and update appendix docs * remove static * Update binary_search_insertion.cs * Update binary_search_insertion.cs * Update binary_search_edge.cs * Update binary_search_insertion.cs * Update binary_search_edge.cs --------- Co-authored-by: Yudong Jin <krahets@163.com>
39 lines
1.1 KiB
YAML
39 lines
1.1 KiB
YAML
# This workflow will build a .NET project
|
|
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
|
|
|
|
name: .NET
|
|
|
|
on:
|
|
push:
|
|
branches: [ "main" ]
|
|
paths: ["codes/csharp/**/*.cs"]
|
|
pull_request:
|
|
branches: [ "main" ]
|
|
paths: ["codes/csharp/**/*.cs"]
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build:
|
|
name: .NET ${{ matrix.dotnet-version }} on ${{ matrix.os }}
|
|
runs-on: ${{ matrix.os }}
|
|
defaults:
|
|
run:
|
|
working-directory: codes/csharp/
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
dotnet-version: ["8.0.x"]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Setup .NET ${{ matrix.dotnet-version }}
|
|
uses: actions/setup-dotnet@v3
|
|
with:
|
|
dotnet-version: ${{ matrix.dotnet-version }}
|
|
- name: Restore dependencies
|
|
run: dotnet restore hello-algo.csproj
|
|
- name: Build
|
|
run: dotnet build --no-restore hello-algo.csproj
|
|
- name: Test with dotnet
|
|
run: dotnet test hello-algo.csproj
|