Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set up GitHub Actions for PR build #11

Merged
merged 6 commits into from
Feb 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .github/workflows/actions-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Copyright (C) Microsoft Corporation. All rights reserved.
# Licensed under the MIT license. See LICENSE.txt in the project root for license information.

name: PR Build

on: [ push ]

env:
# Path to the project source.
PROJECT_PATH: VSConfigFinder

# Path to the test project source.
TEST_PROJECT_PATH: VSConfigFinder.Test

# Configuration type to build.
BUILD_CONFIGURATION: Release

jobs:
build:
runs-on: windows-2022

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Install .NET Core SDK
uses: actions/setup-dotnet@v3
with:
global-json-file: global.json

- name: Restore dependencies
run: dotnet restore

- name: Build
run: dotnet build --no-restore --configuration ${{ env.BUILD_CONFIGURATION }} ${{ env.PROJECT_PATH }}

- name: Test
run: dotnet test --verbosity normal --configuration ${{ env.BUILD_CONFIGURATION }} ${{ env.TEST_PROJECT_PATH }}
6 changes: 6 additions & 0 deletions global.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"sdk": {
"version": "7.0.200",
"rollForward": "feature"
}
}
2 changes: 1 addition & 1 deletion vsts-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ steps:
- task: UseDotNet@2
displayName: 'Install .NET Core SDK'
inputs:
version: '7.x'
useGlobalJson: true

- task: DotNetCoreCLI@2
displayName: Build
Expand Down