Skip to content

Dev ops

Dev ops #2

Workflow file for this run

# main ci workflow is to ensure the codebase builds.
# all unit tests must pass for the workflow to complete successfully.
name: main-ci
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
schedule:
- cron: "0 7 * * *"
workflow_dispatch:
permissions:
contents: read
env:
DOTNET_VERSION: '2.1.x'
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup DotNet ${{ env.DOTNET_VERSION }} Environment
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release
- name: Test
run: dotnet test --configuration Release --no-restore
- name: Publish test results
uses: actions/upload-artifact@v2
with:
name: test-results
path: '**/TestResults/*.xml'
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}