Skip to content

Commit

Permalink
test: Test coverage using Codecov
Browse files Browse the repository at this point in the history
  • Loading branch information
amosavian committed Jun 18, 2024
1 parent 57f47a6 commit e17bc1b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/swift.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
branches: [ "main" ]

jobs:
build:
build-and-test:
name: Swift ${{ matrix.swift }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
Expand All @@ -28,4 +28,9 @@ jobs:
- name: Build
run: swift build -v
- name: Run tests
run: swift test -v
run: swift test -v --enable-code-coverage
- name: Submit code coverage
uses: vapor/swift-codecov-action@v0.3
with:
codecov_token: ${{ secrets.CODECOV_TOKEN }}

5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ A library for working with JSON Web Signature (JWS) and JSON Web Token (JWT).
[![Quality Gate Status][sonar-quality-badge]][sonar-link]
[![Technical Debt][sonar-tech-debt-badge]][sonar-link]
[![Maintainability Rating][sonar-maintainability-badge]][sonar-link]
[![Coverage][sonar-coverage-badge]][sonar-link]
[![Coverage][codecov-coverage-badge]][codecov-link]

[![][swift-versions-badge]][spi-url]
[![][platforms-badge]][spi-url]
Expand Down Expand Up @@ -143,12 +143,13 @@ For detailed usage and API documentation, check [the documentation][docs].
[release-url]: https://github.com/amosavian/JWSETKit/releases

[sonar-link]: https://sonarcloud.io/summary/new_code?id=amosavian_JWSETKit
[codecov-link]: https://codecov.io/gh/amosavian/JWSETKit
[sonar-quality-badge]: https://sonarcloud.io/api/project_badges/measure?project=amosavian_JWSETKit&metric=alert_status
[sonar-cloc-badge]: https://sonarcloud.io/api/project_badges/measure?project=amosavian_JWSETKit&metric=ncloc
[sonar-duplicated-lines-badge]: https://sonarcloud.io/api/project_badges/measure?project=amosavian_JWSETKit&metric=duplicated_lines_density
[sonar-maintainability-badge]: https://sonarcloud.io/api/project_badges/measure?project=amosavian_JWSETKit&metric=sqale_rating
[sonar-tech-debt-badge]: https://sonarcloud.io/api/project_badges/measure?project=amosavian_JWSETKit&metric=sqale_index
[sonar-coverage-badge]: https://sonarcloud.io/api/project_badges/measure?project=amosavian_JWSETKit&metric=coverage
[codecov-coverage-badge]: https://codecov.io/gh/amosavian/JWSETKit/graph/badge.svg?token=PIYYY5XWAG

[swift-versions-badge]: https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Famosavian%2FJWSETKit%2Fbadge%3Ftype%3Dswift-versions
[spi-url]: https://swiftpackageindex.com/amosavian/JWSETKit
Expand Down

0 comments on commit e17bc1b

Please sign in to comment.