Skip to content

Commit

Permalink
Merge pull request #3 from ameghdadian/cicd
Browse files Browse the repository at this point in the history
Feat(cicd): Coverage Report Workflow and Github Coverage Badge
  • Loading branch information
ameghdadian authored Oct 22, 2024
2 parents ddafa32 + a162a7c commit f852d35
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/github-actions.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
name: Test & Build
on:
push:
branches:
Expand Down
27 changes: 27 additions & 0 deletions .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Code Test Coverage

on: [push, pull_request]

jobs:
test:
name: Test with Coverage
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: '1.22.3'
- name: Check out code
uses: actions/checkout@v2
- name: Install dependencies
run: |
go mod download
- name: Run Unit tests
run: |
go test -race -covermode atomic -coverprofile=covprofile ./...
- name: Install goveralls
run: go install github.com/mattn/goveralls@latest
- name: Send coverage
env:
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: goveralls -coverprofile=covprofile -service=github
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
<div align="center">
<h1>Reservationist</h1>
<a href="https://github.com/TheAlgorithms/Python/actions">
<a href="https://github.com/ameghdadian/reservationist/actions">
<img src="https://img.shields.io/github/actions/workflow/status/ameghdadian/reservationist/github-actions.yaml?branch=main&label=CI&logo=github&style=flat-square" height="20" alt="GitHub Workflow Status">
</a>
<a href="https://img.shields.io/coverallsCoverage/github/ameghdadian/reservationist">
<img src="https://img.shields.io/coverallsCoverage/github/ameghdadian/reservationist" height="20" alt="GitHub Workflow Status">
</a>

<h3>A Restful API written in Go, confirming with DDD principles which you can use to book appointments</h3>
</div>

Expand Down

0 comments on commit f852d35

Please sign in to comment.