Skip to content

Commit

Permalink
ci: add github ci
Browse files Browse the repository at this point in the history
  • Loading branch information
cnblogs-dudu committed Feb 11, 2023
1 parent b8f2e70 commit 511be31
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 10 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: CI

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
test:
runs-on: ubuntu-latest
container: mcr.microsoft.com/dotnet/sdk:7.0

steps:
- name: Checkout
uses: actions/checkout@v3
- name: Build
run: ./build.sh
- name: Test
run: ./test.sh

12 changes: 2 additions & 10 deletions build.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
#!/bin/bash
dotnet --info
#!/usr/bin/env bash
dotnet restore

for path in src/**/*.csproj; do
dotnet build -f netstandard2.0 -c Release ${path}
done

for path in test/*.Tests/*.csproj; do
dotnet test -f netcoreapp2.0 -c Release ${path}
done
dotnet build -c Release
2 changes: 2 additions & 0 deletions test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/usr/bin/env bash
dotnet test -c Release

0 comments on commit 511be31

Please sign in to comment.