-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (34 loc) · 1.09 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
on:
pull_request:
branches:
- main
env:
DOTNET_BUILD_DEPENDENCY_VERSION: '3.1.x'
DOTNET_VERSION: '5.0.x'
PROJECT_FILE: azure-func-dotnet-play.csproj
OUTPUT_DIRECTORY: output
name: CI Workflow
jobs:
ci-build-test:
runs-on: ubuntu-latest
steps:
# Checkout code
- uses: actions/checkout@v2
- name: 'Setup DotNet ${{ env.DOTNET_BUILD_DEPENDENCY_VERSION }} Env (Build Step Dependency)'
uses: actions/setup-dotnet@v1.7.2
with:
dotnet-version: ${{ env.DOTNET_BUILD_DEPENDENCY_VERSION }}
- name: 'Setup DotNet ${{ env.DOTNET_VERSION }} Env'
uses: actions/setup-dotnet@v1.7.2
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Install dependencies
shell: bash
run: 'dotnet restore ${{ env.PROJECT_FILE }}'
- name: Build project
shell: bash
run: 'dotnet build ${{ env.PROJECT_FILE }} --configuration Release --no-restore --output ./${{ env.OUTPUT_DIRECTORY }}'
- name: Test project
shell: bash
run: 'dotnet test ${{ env.PROJECT_FILE }} --no-build'
# TODO: add lint step