Skip to content

Commit 06149eb

Browse files
authored
fix CI
1 parent ce1e82a commit 06149eb

File tree

1 file changed

+38
-20
lines changed

1 file changed

+38
-20
lines changed

CONTRIBUTING.md

Lines changed: 38 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,10 @@ bazel-bin/examples/simple/example_simple
6262

6363
### DevContainer Setup for Project
6464

65-
This guide provides instructions on how to set up and use the development container (`devcontainer`) environment to streamline testing and development for this project. With the DevContainer, you can work in a consistent environment configured with all the necessary dependencies and tools.
65+
This guide provides instructions on how to set up and use the development
66+
container (`devcontainer`) environment to streamline testing and development
67+
for this project. With the DevContainer, you can work in a consistent environment
68+
configured with all the necessary dependencies and tools.
6669

6770
#### Prerequisites
6871

@@ -73,52 +76,67 @@ Before getting started, ensure you have the following installed:
7376

7477
#### Getting Started
7578

76-
1. **Open the Project in DevContainer**:
77-
- Open the project in VSCode.
78-
- When prompted to "Reopen in Container," select this option. If you’re not prompted, you can manually open the container by selecting **Remote-Containers: Reopen in Container** from the command palette (`F1` or `Ctrl+Shift+P`).
79+
1. **Open the Project in DevContainer**:
7980

80-
2. **Container Setup**: The DevContainer environment will automatically build based on the configuration files provided (e.g., `.devcontainer/devcontainer.json`). This setup will install required dependencies, tools, and environment variables needed for the project.
81+
Open the project in VSCode. When prompted to "Reopen in Container," select
82+
this option. If you’re not prompted, you can manually open the container by
83+
selecting **Remote-Containers: Reopen in Container** from the command palette
84+
(`F1` or `Ctrl+Shift+P`).
85+
86+
2. **Container Setup**:
87+
88+
The DevContainer environment will automatically build based on the configuration
89+
files provided (e.g., `.devcontainer/devcontainer.json`). This setup will install
90+
required dependencies, tools, and environment variables needed for the project.
8191

8292
#### Available Commands
8393

84-
Once inside the DevContainer, you can use the following commands to run tests and CI workflows.
94+
Once inside the DevContainer, you can use the following commands to run tests
95+
and CI workflows.
8596

86-
#### 1. Run Tests with Bazelisk
97+
##### 1. Run Tests with Bazelisk
8798

8899
To run tests with Bazelisk using specific compilation options, use:
89100

90101
```bash
91102
bazelisk-linux-amd64 test --copt=-DENABLE_LOGS_PREVIEW --test_output=errors --cache_test_results=no --copt=-DENABLE_TEST //exporters/otlp/...
92103
```
93104

94-
##### Command Breakdown:
95-
- `--copt=-DENABLE_LOGS_PREVIEW`: Enables preview logs.
96-
- `--test_output=errors`: Shows only the errors in the test output.
97-
- `--cache_test_results=no`: Forces Bazel to re-run tests without caching.
98-
- `--copt=-DENABLE_TEST`: Enables testing capabilities for the target code.
99-
- `//exporters/otlp/...`: Specifies the test target path.
105+
###### Command Breakdown
106+
107+
- `--copt=-DENABLE_LOGS_PREVIEW`: Enables preview logs.
108+
- `--test_output=errors`: Shows only the errors in the test output.
109+
- `--cache_test_results=no`: Forces Bazel to re-run tests without caching.
110+
- `--copt=-DENABLE_TEST`: Enables testing capabilities for the target code.
111+
- `//exporters/otlp/...`: Specifies the test target path.
100112

101-
#### 2. Run CI Script
113+
##### 2. Run CI Script
102114

103-
You can also run the CI script provided to perform testing with the following command as an example:
115+
You can also run the CI script provided to perform testing with the following command as an
116+
example:
104117

105118
```bash
106119
bash ci/do_ci.sh cmake.exporter.otprotocol.test
107120
```
108121

109-
This command initiates the CI pipeline, executing tests specifically for the **cmake.exporter.otprotocol** module.
122+
This command initiates the CI pipeline, executing tests specifically for the
123+
**cmake.exporter.otprotocol** module.
110124

111125
#### Troubleshooting
112126

113127
If you encounter issues:
114128

115-
- **Rebuild the DevContainer**: From the command palette, run **Remote-Containers: Rebuild Container** to reinitialize the environment.
116-
- **Check Bazelisk and CI Script Logs**: Inspect logs for any configuration or dependency issues.
129+
- **Rebuild the DevContainer**: From the command palette, run
130+
**Remote-Containers: Rebuild Container** to reinitialize the environment.
131+
- **Check Bazelisk and CI Script Logs**: Inspect logs for any configuration or
132+
dependency issues.
117133

118134
#### Additional Notes
119135

120-
- You can adjust compiler options (`--copt`) as needed to test additional flags or enable/disable specific features.
121-
- The test results will be displayed in the terminal within the DevContainer for easy debugging.
136+
- You can adjust compiler options (`--copt`) as needed to test additional flags
137+
or enable/disable specific features.
138+
- The test results will be displayed in the terminal within the DevContainer for
139+
easy debugging.
122140

123141
#### Resources
124142

0 commit comments

Comments
 (0)