├── .gitignore ├── .travis.yml ├── dub.json ├── source └── test.d ├── .github └── workflows │ └── enforce-license-compliance.yml ├── LICENSE.md └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | .dub 2 | docs.json 3 | __dummy.html 4 | *.o 5 | *.obj 6 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: d 2 | sudo: false 3 | d: 4 | - dmd-2.066.1 5 | 6 | script: 7 | - dub test -b unittest-cov --compiler=${DC} 8 | 9 | after_success: 10 | - bash <(curl -s https://codecov.io/bash) 11 | -------------------------------------------------------------------------------- /dub.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "codcov-d", 3 | "description": "A codecov.io usage example", 4 | "copyright": "Copyright © 2015, codecov, Colden Cullen", 5 | "license": "MIT", 6 | "authors": [ "Colden Cullen" ] 7 | } 8 | -------------------------------------------------------------------------------- /source/test.d: -------------------------------------------------------------------------------- 1 | module test; 2 | 3 | bool func1() 4 | { 5 | auto success = 2 > 1; // Hit! 6 | return success; 7 | } 8 | 9 | bool func2() 10 | { 11 | auto success = 2 < 1; // Not hit! 12 | return success; 13 | } 14 | 15 | unittest 16 | { 17 | assert( func1() ); 18 | // assert( func2() ); 19 | } 20 | -------------------------------------------------------------------------------- /.github/workflows/enforce-license-compliance.yml: -------------------------------------------------------------------------------- 1 | name: Enforce License Compliance 2 | 3 | on: 4 | pull_request: 5 | branches: [main, master] 6 | 7 | jobs: 8 | enforce-license-compliance: 9 | runs-on: ubuntu-latest 10 | steps: 11 | - name: 'Enforce License Compliance' 12 | uses: getsentry/action-enforce-license-compliance@57ba820387a1a9315a46115ee276b2968da51f3d # main 13 | with: 14 | fossa_api_key: ${{ secrets.FOSSA_API_KEY }} 15 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 Codecov 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # [Codecov][1] D Example 2 | ## Guide 3 | This repository serves as an **example** on how to use [Codecov Global][4] for D. 4 | 5 | ### Travis Setup 6 | 7 | Add to your `.travis.yml` file. 8 | ```yml 9 | language: d 10 | d: 11 | - dmd-2.066.1 12 | 13 | script: 14 | - dub test -b unittest-cov --compiler=${DC} 15 | after_success: 16 | - bash <(curl -s https://codecov.io/bash) 17 | ``` 18 | 19 | ## Caveats 20 | ### Private Repos 21 | Add to your `.travis.yml` file. 22 | ```yml 23 | after_success: 24 | - bash <(curl -s https://codecov.io/bash) -t uuid-repo-token 25 | ``` 26 | 27 | ## Support 28 | 29 | ### Contact 30 | - Intercom (in-app messanger) 31 | - Email: support@codecov.io 32 | - Slack: slack.codecov.io 33 | - [gh/codecov/support](https://github.com/codecov/support) 34 | 35 | 1. More documentation at https://docs.codecov.io 36 | 2. Configure codecov through the `codecov.yml` https://docs.codecov.io/docs/codecov-yaml 37 | 38 | 39 | 40 | We are happy to help if you have any questions. Please contact email our Support at [support@codecov.io](mailto:support@codecov.io) 41 | 42 | [1]: https://codecov.io/ 43 | [2]: https://github.com/codecov/example-php/blob/master/.travis.yml#L15 44 | [3]: https://github.com/codecov/example-php/blob/master/.travis.yml#L18 45 | [4]: https://github.com/codecov/codecov-python 46 | --------------------------------------------------------------------------------