Skip to content

Commit 42fe6af

Browse files
committed
Update README
1 parent 433b809 commit 42fe6af

File tree

1 file changed

+18
-43
lines changed

1 file changed

+18
-43
lines changed

‎README.md

Lines changed: 18 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,31 @@
1-
[Codecov][1] Objective-C Example
2-
================================
1+
# [Codecov](https://codecov.io) Objective-C Example
2+
> For a Swift-specific example, see https://github.com/codecov/example-swift
33
4-
This repository serves as an **example** on how to use [Codecov Global][4] for Xcode in both Objective-C and Swift.
4+
## Guide
55

6-
> PS there is a Swift specific example here https://github.com/codecov/example-swift
7-
8-
[![codecov.io](http://codecov.io/github/codecov/example-objc/branch/master/graphs/badge.svg)](http://codecov.io/github/codecov/example-objc)
9-
10-
# Setup
11-
12-
* Create a shared scheme for your test target https://i.imgur.com/JKNFq0G.png
13-
* At the highest, your deployment target can be 8.1 or earlier. This will update as Travis supports more simulators.
14-
* Write unit tests
15-
* Setup your CI
16-
17-
> `xctool` also does not respect the /Scheme/TestAction/@codeCoverageEnabled setting in .xcscheme files. Make sure `-enableCodeCoverage YES` is set.
18-
19-
# Travis CI
6+
### Travis Setup
207

218
Add to your `.travis.yml` file.
229
```yml
2310
language: objective-c
24-
script:
11+
script:
2512
- xctool -project {{path_to_xcodeproj}} -scheme {{your_testing_scheme}} build test -sdk iphonesimulator GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES GCC_GENERATE_TEST_COVERAGE_FILES=YES
2613
after_success:
2714
- bash <(curl -s https://codecov.io/bash)
2815
```
2916
30-
> Reference http://docs.travis-ci.com/user/languages/objective-c/
31-
32-
The two important parts are:
33-
* `GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES GCC_GENERATE_TEST_COVERAGE_FILES=YES` (To have Xcode create code coverage files)
34-
* `bash <(curl -s https://codecov.io/bash)` (To upload code coverage to Codecov.io)
35-
36-
This is used to have Xcode output code coverage files for Codecov.io to process.
37-
38-
## Private Repos
39-
> Set `CODECOV_TOKEN` in your environment variables.
17+
### Produce Coverage Reports
18+
The two important parts are:
4019
41-
Add to your `.travis.yml` file.
42-
```yml
43-
after_success:
44-
- bash <(curl -s https://codecov.io/bash) -t :uuid-repo-token
45-
```
46-
> Or you can set the environment variable `CODECOV_TOKEN` to your token.
20+
- `GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES GCC_GENERATE_TEST_COVERAGE_FILES=YES` (To have Xcode create code coverage files)
21+
* Create a shared scheme for your test target https://i.imgur.com/JKNFq0G.png
22+
* xctool also does not respect the `/Scheme/TestAction/@codeCoverageEnabled` setting in `.xcscheme` files. Make sure `-enableCodeCoverage YES` is set.
4723

48-
## Build specific projects
24+
## Caveats
25+
### Private Repo
26+
Repository tokens are required for (a) all private repos, (b) public repos not using Travis-CI, CircleCI or AppVeyor. Find your repository token at Codecov and provide via appending `-t <your upload token>` to you where you upload reports.
4927

28+
### Build specific projects
5029
```
5130
# match ExampleName and ExampleNameTests
5231
bash <(curl -s https://codecov.io/bash) -J 'ExampleName'
@@ -55,11 +34,7 @@ bash <(curl -s https://codecov.io/bash) -J 'ExampleName'
5534
bash <(curl -s https://codecov.io/bash) -J '^ExampleName$'
5635
```
5736
58-
View source and learn more about [Codecov Global Uploader][4]
59-
60-
We are happy to help if you have any questions. Please contact email our Support at [support@codecov.io](mailto:support@codecov.io)
61-
62-
[1]: https://codecov.io/
63-
[2]: https://twitter.com/codecov
64-
[3]: mailto:hello@codecov.io
65-
[4]: https://github.com/codecov/codecov-bash
37+
## Links
38+
- [Community Boards](https://community.codecov.io)
39+
- [Support](https://codecov.io/support)
40+
- [Documentation](https://docs.codecov.io)

0 commit comments

Comments
 (0)