Skip to content

Commit

Permalink
chore(ci-extensions): added ci workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
egbakou committed Dec 17, 2023
1 parent fb2ce4e commit 33b26a7
Showing 1 changed file with 81 additions and 0 deletions.
81 changes: 81 additions & 0 deletions .github/workflows/ci-extensions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net

name: DomainVerifier.Extensions CI

on:
push:
branches: [ "main" ]
paths:
- 'DomainVerier.sln'
- 'src/DomainVerifier.Extensions/**'
- 'tests/DomainVerifier.Extensions.Tests/**'
- '**/ci-extensions.yml'
pull_request:
branches: [ "main" ]
paths:
- 'DomainVerier.sln'
- 'src/DomainVerifier.Extensions/**'
- 'tests/DomainVerifier.Extensions.Tests/**'
- '**/ci-extensions.yml'
workflow_dispatch:

jobs:
compile:
name: Build
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
matrix:
dotnet-version: [ '8.0.x', '7.0.x', '6.0.x' ]
steps:
- name: Check out code
uses: actions/checkout@v3

- name: Install .NET SDK 8.0.x
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ matrix.dotnet-version }}

- name: Restore dependencies
run: dotnet restore
working-directory: ./src/DomainVerifier.Extensions

- name: Restore NuGet packages
run: dotnet build -c Release --no-restore
working-directory: ./src/DomainVerifier.Extensions


test-containers:
needs: compile
name: Tests
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Check out code
uses: actions/checkout@v3

- name: Install .NET SDK
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
8.0.x
7.0.x
6.0.x
- name: Run tests
run: dotnet test -c Release --verbosity normal --collect:"XPlat Code Coverage" --results-directory ./coverage
working-directory: ./tests/DomainVerifier.Extensions.Tests

- name: Code Coverage Report
uses: irongut/CodeCoverageSummary@v1.3.0
with:
filename: tests/DomainVerifier.Extensions.Tests/coverage/**/coverage.cobertura.xml
badge: true
fail_below_min: true
format: markdown
hide_branch_rate: false
hide_complexity: true
indicators: true
output: both
thresholds: '90 100'

0 comments on commit 33b26a7

Please sign in to comment.