Skip to content

chore: migrate build to GitHub Actions #4

chore: migrate build to GitHub Actions

chore: migrate build to GitHub Actions #4

Workflow file for this run

name: "build and test"
on:
push:
branches: ["main"]
paths:
- 'src/**'
pull_request:
branches: ["main"]
paths:
- 'src/**'
- '.github/workflows/build.yml'
permissions:
actions: write
jobs:
analyze:
name: build
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: '7.x'
- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v0
with:
versionSpec: '5.x'
preferLatestVersion: true
- name: Determine version
uses: gittools/actions/gitversion/execute@v0
with:
updateAssemblyInfo: true
useConfigFile: true
configFilePath: gitversion.yml
- name: Build solution
run: dotnet build >
--configuration Release
/p:Version=${{env.nuGetVersion}}
/p:ContinuousIntegrationBuild=true
/warnaserror
- name: Test library
run: dotnet test >
tests/indicators/Tests.Indicators.csproj
--configuration Release
--no-restore
--no-build
--collect:"XPlat Code Coverage" -- DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Format=cobertura