|
1 | | -# This workflow will build a .NET project |
2 | | -# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net |
3 | | - |
4 | | -name: .NET |
5 | | - |
6 | | -on: |
7 | | - push: |
8 | | - branches: ["main"] |
9 | | - paths: |
10 | | - - "codes/csharp/**/*.cs" |
11 | | - - "en/codes/csharp/**/*.cs" |
12 | | - pull_request: |
13 | | - branches: ["main"] |
14 | | - paths: |
15 | | - - "codes/csharp/**/*.cs" |
16 | | - - "en/codes/csharp/**/*.cs" |
17 | | - workflow_dispatch: |
18 | | - |
19 | | -jobs: |
20 | | - build: |
21 | | - name: .NET ${{ matrix.dotnet-version }} on ${{ matrix.os }} |
22 | | - runs-on: ${{ matrix.os }} |
23 | | - defaults: |
24 | | - run: |
25 | | - working-directory: ${{ matrix.code-dir }} |
26 | | - strategy: |
27 | | - matrix: |
28 | | - os: [ubuntu-latest, macos-latest, windows-latest] |
29 | | - dotnet-version: ["8.0.x"] |
30 | | - code-dir: ["codes/csharp", "en/codes/csharp"] |
31 | | - |
32 | | - steps: |
33 | | - - uses: actions/checkout@v4 |
34 | | - |
35 | | - - name: Setup .NET ${{ matrix.dotnet-version }} |
36 | | - uses: actions/setup-dotnet@v3 |
37 | | - with: |
38 | | - dotnet-version: ${{ matrix.dotnet-version }} |
39 | | - - name: Restore dependencies |
40 | | - run: dotnet restore hello-algo.csproj |
41 | | - - name: Build |
42 | | - run: dotnet build --no-restore hello-algo.csproj |
43 | | - - name: Test with dotnet |
44 | | - run: dotnet test hello-algo.csproj |
| 1 | +# This workflow will build a .NET project |
| 2 | +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net |
| 3 | + |
| 4 | +name: .NET |
| 5 | + |
| 6 | +on: |
| 7 | + push: |
| 8 | + branches: ["main"] |
| 9 | + paths: |
| 10 | + - "codes/csharp/**/*.cs" |
| 11 | + - "en/codes/csharp/**/*.cs" |
| 12 | + pull_request: |
| 13 | + branches: ["main"] |
| 14 | + paths: |
| 15 | + - "codes/csharp/**/*.cs" |
| 16 | + - "en/codes/csharp/**/*.cs" |
| 17 | + workflow_dispatch: |
| 18 | + |
| 19 | +jobs: |
| 20 | + build: |
| 21 | + name: .NET ${{ matrix.dotnet-version }} on ${{ matrix.os }} |
| 22 | + runs-on: ${{ matrix.os }} |
| 23 | + defaults: |
| 24 | + run: |
| 25 | + working-directory: ${{ matrix.code-dir }} |
| 26 | + strategy: |
| 27 | + matrix: |
| 28 | + os: [ubuntu-latest, macos-latest, windows-latest] |
| 29 | + dotnet-version: ["8.0.x"] |
| 30 | + code-dir: ["codes/csharp", "en/codes/csharp"] |
| 31 | + |
| 32 | + steps: |
| 33 | + - uses: actions/checkout@v6 |
| 34 | + |
| 35 | + - name: Setup .NET ${{ matrix.dotnet-version }} |
| 36 | + uses: actions/setup-dotnet@v3 |
| 37 | + with: |
| 38 | + dotnet-version: ${{ matrix.dotnet-version }} |
| 39 | + - name: Restore dependencies |
| 40 | + run: dotnet restore hello-algo.csproj |
| 41 | + - name: Build |
| 42 | + run: dotnet build --no-restore hello-algo.csproj |
| 43 | + - name: Test with dotnet |
| 44 | + run: dotnet test hello-algo.csproj |
0 commit comments