Skip to content

Commit 873e3cb

Browse files
authored
Add GitHub action for ci build + unit tests (#445)
* Initial version ci * Set the Prerelease env variable * netcoreapp31
1 parent 55b8dcc commit 873e3cb

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

.github/workflows/ci.yml

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Main workflow
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
runs-on: windows-latest
8+
9+
steps:
10+
- name: Set the Prerelease env variable
11+
run: echo "Prerelease=ci" >> $GITHUB_ENV
12+
13+
- name: Generate build number
14+
uses: einaregilsson/build-number@v1
15+
id: buildnumber
16+
with:
17+
token: ${{secrets.github_token}}
18+
19+
- name: Print new build number
20+
run: |
21+
echo "Build number is ${{ steps.buildnumber.outputs.build_number }}"
22+
echo "Build number is ${env:BUILD_NUMBER}"
23+
24+
- uses: actions/checkout@v1
25+
26+
- name: Build Projects
27+
run: |
28+
dotnet build ./src/System.Linq.Dynamic.Core/System.Linq.Dynamic.Core.csproj -c Release -p:buildType=azure-pipelines-ci
29+
30+
- name: Run Tests
31+
run: |
32+
dotnet test ./test/System.Linq.Dynamic.Core.Tests/System.Linq.Dynamic.Core.Tests.csproj -c Release -f net452 -p:buildType=azure-pipelines-ci
33+
dotnet test ./test/System.Linq.Dynamic.Core.Tests/System.Linq.Dynamic.Core.Tests.csproj -c Release -f netcoreapp31 -p:buildType=azure-pipelines-ci

0 commit comments

Comments
 (0)