diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml new file mode 100644 index 000000000..430a48369 --- /dev/null +++ b/.github/workflows/coverage.yml @@ -0,0 +1,26 @@ +name: Coverage + +# Controls when the action will run. Triggers the workflow on push or pull request +# events but only for the master branch +on: + push: + branches: [master] + pull_request: + branches: [master] + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: denolib/setup-deno@v2 + with: + deno-version: v1.8 + - name: Create coverage files + run: deno test --unstable --coverage=coverage # create coverage files + - name: Create coverage report + run: deno --unstable coverage ./coverage --lcov > coverage.lcov # create coverage report + - name: Collect coverage + uses: codecov/codecov-action@v1.0.10 # upload the report on Codecov + with: + file: ./coverage.lcov diff --git a/README.md b/README.md index 468a2bc04..d27b5e0b7 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ Discordeno follows [Semantic Versioning](https://semver.org/) [![Discord](https://img.shields.io/discord/785384884197392384?color=7289da&logo=discord&logoColor=dark)](https://discord.com/invite/5vBgXk3UcZ) ![Lint](https://github.com/discordeno/discordeno/workflows/Lint/badge.svg) ![Test](https://github.com/discordeno/discordeno/workflows/Test/badge.svg) - +[![Coverage](https://img.shields.io/codecov/c/gh/discordeno/discordeno)](https://codecov.io/gh/discordeno/discordeno) ## Features - **Secure & stable**: Discordeno is actively maintained to ensure great