Skip to content

Commit 7e26f59

Browse files
ci: use a fake key for system tests [backport #6702 to 1.16] (#6705)
Backport of #6702 to 1.16 System tests are mandatory to merge PR. The issue is that system tests requires an API_KEY stored in secrests, and it's not possible to share secrets when the PR comes from a forks. Hacks exists, but none of them is fully satisfaying. Turns out that this key does not have to be a valid key for most scenario, as long as nothing is tested on the backend. So trying to use a fake key. ## Checklist - [x] Change(s) are motivated and described in the PR description. - [x] Testing strategy is described if automated tests are not included in the PR. - [x] Risk is outlined (performance impact, potential for breakage, maintainability, etc). - [x] Change is maintainable (easy to change, telemetry, documentation). - [x] [Library release note guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html) are followed. If no release note is required, add label `changelog/no-changelog`. - [x] Documentation is included (in-code, generated user docs, [public corp docs](https://github.com/DataDog/documentation/)). - [x] Backport labels are set (if [applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)) ## Reviewer Checklist - [x] Title is accurate. - [x] No unnecessary changes are introduced. - [x] Description motivates each change. - [x] Avoids breaking [API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces) changes unless absolutely necessary. - [x] Testing strategy adequately addresses listed risk(s). - [x] Change is maintainable (easy to change, telemetry, documentation). - [x] Release note makes sense to a user of the library. - [x] Reviewer has explicitly acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment. - [x] Backport labels are set in a manner that is consistent with the [release branch maintenance policy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting) Co-authored-by: Charles de Beauchesne <[email protected]>
1 parent dec2851 commit 7e26f59

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

.github/workflows/system-tests.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@ jobs:
1919
env:
2020
TEST_LIBRARY: python
2121
WEBLOG_VARIANT: ${{ matrix.weblog-variant }}
22-
DD_API_KEY: ${{ secrets.DD_API_KEY }}
22+
# system-tests requires an API_KEY, but it does not have to be a valid key, as long as we don't run a scenario
23+
# that make assertion on backend data. Using a fake key allow to run system tests on PR originating from forks.
24+
# If ever it's needed, a valid key exists in the repo, using ${{ secrets.DD_API_KEY }}
25+
DD_API_KEY: 1234567890abcdef1234567890abcdef
2326
steps:
2427
- name: Setup python 3.9
2528
uses: actions/setup-python@v4

0 commit comments

Comments
 (0)