Skip to content

Commit 874078a

Browse files
authored
Merge pull request #3 from cnblogs/add-github-ci
ci: add github ci
2 parents b8b56a1 + 511be31 commit 874078a

File tree

3 files changed

+25
-10
lines changed

3 files changed

+25
-10
lines changed

.github/workflows/ci.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
container: mcr.microsoft.com/dotnet/sdk:7.0
13+
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v3
17+
- name: Build
18+
run: ./build.sh
19+
- name: Test
20+
run: ./test.sh
21+

build.sh

100644100755
Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
1-
#!/bin/bash
2-
dotnet --info
1+
#!/usr/bin/env bash
32
dotnet restore
4-
5-
for path in src/**/*.csproj; do
6-
dotnet build -f netstandard2.0 -c Release ${path}
7-
done
8-
9-
for path in test/*.Tests/*.csproj; do
10-
dotnet test -f netcoreapp2.0 -c Release ${path}
11-
done
3+
dotnet build -c Release

test.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/usr/bin/env bash
2+
dotnet test -c Release

0 commit comments

Comments
 (0)