Skip to content

Commit b240942

Browse files
authored
Add Windows Test Runners for All Core Test Suites (#1439)
* Don't build some extensions on windows * Add windows test runners for all core test suites * Update get-envs script to replace grep * Fix missing lambda handler deprecation * Fix paths in logs in context tests * agent_features: Skip all failing windows tests for now * agent_unittests: Skip all failing windows tests for now * cross_agent: Skip all failing windows tests for now * Convert username lookup to more portable option * Fix handling of health dir paths on Windows * Fix issues related to tempfile on Windows * Fix encoding in test fixtures * Fix globbing on Windows * Format * Fix Python 3.7 compat * Drop windows py37 tests * Update build_ext_errors in setup.py for modern versions * Reduce windows testing scope to 3.13 * Change out windows xfails * Enable colors in CI logs on Windows * Update all python-version specs in CI * Update coverage source paths * Add inline pytest ids to unittests * Add tests for all OS and arch combinations * Remove mac tests for now * Disable agent_streaming on windows arm64 * Lint with actionlint * Add wait to collector_available_fixture to fix race condition
1 parent 02d0071 commit b240942

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+675
-363
lines changed

.github/actionlint.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Copyright 2010 New Relic, Inc.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
paths:
16+
.github/workflows/**/*.{yml,yaml}:
17+
ignore:
18+
# This runner exists, but is in beta and not known to actionlint.
19+
- 'label "windows-11-arm" is unknown\. .+'

.github/scripts/get-envs.py

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
#!/usr/bin/env python
2+
# Copyright 2010 New Relic, Inc.
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
16+
import fileinput
17+
import os
18+
from textwrap import dedent
19+
20+
GROUP_NUMBER = int(os.environ["GROUP_NUMBER"]) - 1
21+
TOTAL_GROUPS = int(os.environ["TOTAL_GROUPS"])
22+
GITHUB_JOB = os.environ["GITHUB_JOB"]
23+
24+
25+
def main(stdin):
26+
environments = [env.rstrip() for env in stdin]
27+
filtered_envs = [env for env in environments if env.startswith(GITHUB_JOB + "-")]
28+
grouped_envs = filtered_envs[GROUP_NUMBER::TOTAL_GROUPS]
29+
joined_envs = ",".join(grouped_envs)
30+
31+
# If not environments are found, raise an error with helpful information.
32+
if joined_envs:
33+
print(joined_envs)
34+
else:
35+
error_msg = dedent(f"""
36+
No matching environments found.
37+
GITHUB_JOB = {GITHUB_JOB}
38+
GROUP_NUMBER = {GROUP_NUMBER + 1}
39+
TOTAL_GROUPS = {TOTAL_GROUPS}
40+
41+
environments = {environments}
42+
filtered_envs = {filtered_envs}
43+
grouped_envs = {grouped_envs}
44+
joined_envs = {joined_envs}
45+
""")
46+
raise RuntimeError(error_msg(environments))
47+
48+
49+
if __name__ == "__main__":
50+
with fileinput.input() as stdin:
51+
main(stdin)

.github/scripts/retry.sh

Lines changed: 0 additions & 42 deletions
This file was deleted.

.github/workflows/deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ jobs:
115115

116116
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # 5.6.0
117117
with:
118-
python-version: "3.12"
118+
python-version: "3.13"
119119

120120
- name: Install Dependencies
121121
run: |

.github/workflows/get-envs.py

Lines changed: 0 additions & 36 deletions
This file was deleted.

0 commit comments

Comments
 (0)