Skip to content

Commit

Permalink
chore: Migrate building codebase to GitHub Actions (#1847)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomkerkhove authored Nov 23, 2021
1 parent 10ac4dc commit a496ca5
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 60 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/ci-code.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: CI - Code

on:
workflow_dispatch:
pull_request:
paths:
- .github/workflows/ci-code.yml
- src/**

jobs:
verify_codebase:
name: Verify Codebase
runs-on: ubuntu-latest
steps:
# Checkout code
- name: Checkout Code
uses: actions/checkout@v2

# Install .NET
- name: Install .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: '6.0.x' # SDK Version to use; x will use the latest version of the 3.1 channel

# Build Solution
- name: Build Solution
run: dotnet build src/Promitor.sln --configuration release

# Run Automated Tests
- name: Run Unit Tests
run: dotnet test src/Promitor.Tests.Unit/Promitor.Tests.Unit.csproj --logger "trx;LogFileName=test-results.trx"

# Provide Unit Test Results
- name: Report Unit Test Results
uses: dorny/test-reporter@v1
if: success() || failure()
with:
name: .NET Unit Tests
path: src/**/test-results.trx
reporter: dotnet-trx
19 changes: 0 additions & 19 deletions build/azure-devops/agents-ci-discovery.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,25 +41,6 @@ stages:
persistedVariableName: 'Image.Tag'
- publish: $(Pipeline.Workspace)/variables
artifact: variables
- stage: Build
dependsOn: [Init]
jobs:
- job: Build
displayName: Build Codebase
condition: succeeded()
pool:
vmImage: ubuntu-latest
steps:
- template: templates/build/build-solution.yml
parameters:
dotnetVersion: '$(DotNet.SDK.Version)'
buildConfiguration: '$(DotNet.Configuration)'
targetFolder: '$(Pipeline.Workspace)/build'
- task: PublishPipelineArtifact@0
displayName: 'Publish Build Pipeline Artifact'
inputs:
targetPath: '$(Pipeline.Workspace)/build'
artifactName: Build
- stage: CodeQuality
displayName: Code Quality
dependsOn: [Init]
Expand Down
19 changes: 0 additions & 19 deletions build/azure-devops/agents-ci-scraper.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,25 +39,6 @@ stages:
persistedVariableName: 'Image.Tag'
- publish: $(Pipeline.Workspace)/variables
artifact: variables
- stage: Build
dependsOn: [Init]
jobs:
- job: Build
displayName: Build Codebase
condition: succeeded()
pool:
vmImage: ubuntu-latest
steps:
- template: templates/build/build-solution.yml
parameters:
dotnetVersion: '$(DotNet.SDK.Version)'
buildConfiguration: '$(DotNet.Configuration)'
targetFolder: '$(Pipeline.Workspace)/build'
- task: PublishPipelineArtifact@0
displayName: 'Publish Build Pipeline Artifact'
inputs:
targetPath: '$(Pipeline.Workspace)/build'
artifactName: Build
- stage: CodeQuality
displayName: Code Quality
dependsOn: [Init]
Expand Down
22 changes: 0 additions & 22 deletions build/azure-devops/templates/build/build-solution.yml

This file was deleted.

0 comments on commit a496ca5

Please sign in to comment.