Skip to content

add code coverage report #9

add code coverage report

add code coverage report #9

Workflow file for this run

name: build-by-tag
on:
push:
tags:
- '**' # Push events to every tag including hierarchical tags like v1.0/beta
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
cache: true
cache-dependency-path: '**/packages.lock.json'
- name: Restore Dependencies
run: dotnet restore
- name: Build
run: dotnet build -c Release /p:PublishDir=./publish/app --no-restore
- name: Test
run: dotnet test ./tests/NKZSoft.Template.Application.Tests --configuration Release --no-build
- name: Publish
run: dotnet publish -c Release -p:PublishDir=./publish/app --no-restore --no-build
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/nkz-soft/microservice-template/microservice-template
- name: Login to Github Packages
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build image and push to GitHub Container Registry
uses: docker/build-push-action@v6
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}
- name: Drafts release notes
uses: release-drafter/release-drafter@v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}