Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 28 additions & 7 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,12 @@ jobs:
build-and-unit-tests:
runs-on: ubuntu-latest
name: Build and Unit Tests

permissions:
contents: write # Required for GitHub Pages deployment
pages: write # Required for GitHub Pages deployment
checks: write # Required for test-reporter action
pull-requests: write # Required for test-reporter action on PRs

steps:
- name: Checkout code
uses: actions/checkout@v4
Expand Down Expand Up @@ -46,20 +51,36 @@ jobs:
path: '**/*.trx'
reporter: dotnet-trx

- name: Upload coverage reports
uses: codecov/codecov-action@v4
- name: Install ReportGenerator
if: success()
run: dotnet tool install -g dotnet-reportgenerator-globaltool

- name: Generate Coverage HTML Report
if: success()
run: |
reportgenerator \
-reports:**/coverage.cobertura.xml \
-targetdir:coverage-report \
-reporttypes:"Html;Badges" \
-title:"The Office API - Coverage Report"

- name: Deploy Coverage Report to GitHub Pages
if: success() && github.ref == 'refs/heads/main'
uses: peaceiris/actions-gh-pages@v3
with:
files: '**/coverage.cobertura.xml'
fail_ci_if_error: false
continue-on-error: true
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./coverage-report
commit_message: 'docs: update coverage report'

# Job 2: Mocked Integration Tests
mocked-integration-tests:
runs-on: ubuntu-latest
name: Mocked Integration Tests
needs: build-and-unit-tests

permissions:
checks: write # Required for test-reporter action
pull-requests: write # Required for test-reporter action on PRs

steps:
- name: Checkout code
uses: actions/checkout@v4
Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# The Office API

[![CI](https://github.com/fszymaniak/TheOfficeAPI/actions/workflows/ci.yaml/badge.svg)](https://github.com/fszymaniak/TheOfficeAPI/actions/workflows/ci.yaml)
[![CD](https://github.com/fszymaniak/TheOfficeAPI/actions/workflows/cd.yaml/badge.svg)](https://github.com/fszymaniak/TheOfficeAPI/actions/workflows/cd.yaml)
[![Coverage Report](https://img.shields.io/badge/Coverage-Report-blue)](https://fszymaniak.github.io/TheOfficeAPI/)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=fszymaniak_TheOfficeAPI&metric=alert_status)](https://sonarcloud.io/dashboard?id=fszymaniak_TheOfficeAPI)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![.NET](https://img.shields.io/badge/.NET-9.0-512BD4)](https://dotnet.microsoft.com/download/dotnet/9.0)

A REST API providing information about episodes and seasons from the TV show "The Office", designed to demonstrate the **Richardson Maturity Model** for RESTful API design.

## Overview
Expand Down
Loading