You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/workflows/TestAll_and_Code_Coverage_CI.md
+6-33Lines changed: 6 additions & 33 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,8 +13,7 @@ This repository contains the **Code Coverage CI** GitHub Actions workflow, which
13
13
-[Jobs Definition](#jobs-definition)
14
14
-[Steps Breakdown](#steps-breakdown)
15
15
-[Project Structure](#project-structure)
16
-
-[Benefits](#benefits)
17
-
-[License](#license)
16
+
18
17
19
18
## Overview
20
19
@@ -37,13 +36,13 @@ The **Code Coverage CI** workflow automates testing and code coverage reporting.
37
36
38
37
2.**Add the Workflow File**:
39
38
40
-
- Save the provided workflow YAML file as `.github/workflows/codecov.yml` in your repository.
39
+
- Save the provided workflow YAML file as `.github/workflows/codecov.yml` in the repository.
41
40
42
41
3.**Store Codecov Token**:
43
42
44
43
- In the repository, go to **Settings** > **Secrets and variables** > **Actions**.
45
44
- Click on **New repository secret**.
46
-
- Add `CODECOV_TOKEN` as the name and paste your Codecov token as the value.
45
+
- Add `CODECOV_TOKEN` as the name and paste the Codecov token as the value.
47
46
48
47
4.**Add MOcov to Your Project** (Optional for local testing):
49
48
@@ -61,9 +60,9 @@ The **Code Coverage CI** workflow automates testing and code coverage reporting.
61
60
62
61
5. **Create `run_coverage_tests.m` Script**:
63
62
64
-
- Add the `run_coverage_tests.m` script to the root of your repository. This script runs your tests and generates the coverage report using MOcov.
63
+
- Add the `run_coverage_tests.m` script to the root of the repository. This script runs tests and generates the coverage report using MOcov.
65
64
66
-
6. **Organize Your Project**:
65
+
6. **Organize Project**:
67
66
68
67
- **Source Code**: Place your MATLAB source code in the `src` directory.
69
68
- **Tests**: Place test files in the `test` directory. Ensure `testAll.m` or your main test script is in this directory.
@@ -104,7 +103,7 @@ jobs:
104
103
105
104
1. **Checkout Repository**
106
105
107
-
Checks out your repository code so the workflow can access it.
106
+
Checks out thr repository code so the workflow can access it.
108
107
109
108
```yaml
110
109
- uses: actions/checkout@v3
@@ -197,17 +196,7 @@ jobs:
197
196
comment: true
198
197
```
199
198
200
-
6. **Optional Debugging Steps**
201
199
202
-
You can include these steps to list files and display the coverage report for debugging purposes.
203
-
204
-
```yaml
205
-
- name: List workspace files
206
-
run: ls -R
207
-
208
-
- name: Display coverage.xml
209
-
run: cat coverage.xml
210
-
```
211
200
212
201
## Project Structure
213
202
@@ -226,19 +215,3 @@ your-repository/
226
215
└── (Other project files)
227
216
```
228
217
229
-
## Benefits
230
-
231
-
- **Automated Testing**: Ensures that all code changes are automatically tested.
232
-
- **Code Coverage Metrics**: Provides insights into which parts of your codebase are tested.
233
-
- **Continuous Integration**: Integrates seamlessly with GitHub Actions for CI/CD workflows.
234
-
- **Feedback on Pull Requests**: Codecov can comment on pull requests with coverage reports (requires proper setup and permissions).
235
-
236
-
## License
237
-
238
-
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.
239
-
240
-
---
241
-
242
-
**Note**: Ensure that your repository has the Codecov GitHub App installed and configured with the necessary permissions to post comments on pull requests. For private repositories, make sure your Codecov account has access to the repository and that the `CODECOV_TOKEN` is correctly set up in your GitHub repository secrets.
243
-
244
-
If you encounter issues with Codecov not posting comments on pull requests, refer to the [Codecov documentation](https://docs.codecov.com/docs) or contact [Codecov support](https://community.codecov.io/) for assistance.
0 commit comments