Skip to content

Commit 0679c95

Browse files
sarah-wittAAraKKe
andauthored
Add test-all-windows workflow (DataDog#20963)
* Add windows jobs to test all * update jobs * Revert "Add windows jobs to test all" This reverts commit 84f4496. * Add remaining tests * Move windows tests from PR all to its own workflow to avoid max number of jobs per workflow * Add other workflows just for windows * Fix names and add flaky windows too * Fix flaky tests * Add missing flaky tests windows file * Move all windows tests to the windows test-all workflow * Update validate CI and add changelog * Remove debug exports * Update .github/workflows/test-agent-windows.yml Co-authored-by: Sarah Witt <sarah.witt@datadoghq.com> --------- Co-authored-by: Juanpe Araque <juanpedro.araque@datadoghq.com>
1 parent 48cc931 commit 0679c95

File tree

13 files changed

+866
-278
lines changed

13 files changed

+866
-278
lines changed
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: Daily Flaky Tests (every 8 hours) - Windows
2+
# This is a temporary fix to avoid hitting the max 256 jobs per workflow limit
3+
# We will remove this once we have a better solution
4+
5+
on:
6+
workflow_dispatch:
7+
schedule:
8+
# 4 AM, 12 PM, 8 PM UTC
9+
- cron: "0 4,12,20 * * *"
10+
11+
jobs:
12+
cache:
13+
uses: ./.github/workflows/cache-shared-deps.yml
14+
15+
test:
16+
needs:
17+
- cache
18+
19+
uses: ./.github/workflows/test-all-windows.yml
20+
with:
21+
repo: core
22+
23+
# Options
24+
# Because -m starts with a dash,
25+
# click (the library used to build the CLI) will
26+
# interpret it as an option, not as an argument.
27+
# To avoid this, using -- syntax,
28+
# which tells the command that everything following it
29+
# should be treated as positional arguments, not options
30+
pytest-args: '-m flaky'
31+
secrets: inherit
32+
33+
permissions:
34+
# needed for compute-matrix in test-target.yml
35+
contents: read
36+
37+
publish-test-results:
38+
needs:
39+
- test
40+
if: success() || failure()
41+
concurrency:
42+
group: test-results
43+
44+
permissions:
45+
checks: write # Needed for test-results-master
46+
contents: write # Needed for test-results-master
47+
pull-requests: write # Needed for test-results-master
48+
49+
uses: ./.github/workflows/test-results-master.yml
50+
secrets: inherit
51+
52+
submit-traces:
53+
needs:
54+
- test
55+
if: success() || failure()
56+
57+
uses: ./.github/workflows/submit-traces.yml
58+
secrets: inherit
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
name: Master Windows
2+
# This is a temporary fix to avoid hitting the max 256 jobs per workflow limit
3+
# We will remove this once we have a better solution
4+
5+
on:
6+
push:
7+
branches:
8+
- master
9+
10+
jobs:
11+
cache:
12+
uses: ./.github/workflows/cache-shared-deps.yml
13+
14+
test:
15+
needs:
16+
- cache
17+
18+
uses: ./.github/workflows/test-all-windows.yml
19+
with:
20+
repo: core
21+
22+
# Options
23+
# Because -m starts with a dash,
24+
# click (the library used to build the CLI) will
25+
# interpret it as an option, not as an argument.
26+
# To avoid this, using -- syntax,
27+
# which tells the command that everything following it
28+
# should be treated as positional arguments, not options
29+
pytest-args: '-m "not flaky"'
30+
secrets: inherit
31+
32+
permissions:
33+
# needed for compute-matrix in test-target.yml
34+
contents: read
35+
36+
publish-test-results:
37+
38+
needs:
39+
- test
40+
41+
if: success() || failure()
42+
concurrency:
43+
group: test-results
44+
45+
permissions:
46+
checks: write
47+
pull-requests: write
48+
contents: write
49+
50+
uses: ./.github/workflows/test-results-master.yml
51+
secrets: inherit
52+
53+
upload-coverage:
54+
needs:
55+
- test
56+
if: >
57+
!github.event.repository.private &&
58+
(success() || failure())
59+
runs-on: ubuntu-latest
60+
permissions:
61+
# needed for codecov, allows the action to get a JWT signed by Github
62+
id-token: write
63+
contents: read
64+
65+
steps:
66+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
67+
68+
- name: Download all coverage artifacts
69+
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
70+
with:
71+
pattern: coverage-*
72+
path: coverage-reports
73+
merge-multiple: false
74+
75+
- name: Upload coverage to Codecov
76+
uses: codecov/codecov-action@15559ed290fa727036809b67ab0f646ffa6c5158
77+
with:
78+
use_oidc: true
79+
directory: coverage-reports
80+
fail_ci_if_error: false
81+
82+
submit-traces:
83+
needs:
84+
- test
85+
if: success() || failure()
86+
87+
uses: ./.github/workflows/submit-traces.yml
88+
secrets: inherit

.github/workflows/master.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ jobs:
3232
contents: read
3333

3434
publish-test-results:
35-
3635
needs:
3736
- test
3837

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Nightly minimum base package test - Windows
2+
# This is a temporary fix to avoid hitting the max 256 jobs per workflow limit
3+
# We will remove this once we have a better solution
4+
5+
on:
6+
# Triggering minimum base package tests can be useful outside of the schedule, for instance for PRs
7+
# that add new integrations or ones that bump the Pydantic dependency in the base package.
8+
# Until we figure out how best to trigger these automatically we're leaving the door open to easily
9+
# trigger this manually with the right branch.
10+
workflow_dispatch:
11+
schedule:
12+
# 5 AM UTC
13+
- cron: "0 5 * * *"
14+
15+
jobs:
16+
test:
17+
uses: ./.github/workflows/test-all-windows.yml
18+
19+
permissions:
20+
# needed for codecov in test-target.yml, allows the action to get a JWT signed by Github
21+
id-token: write
22+
# needed for compute-matrix in test-target.yml
23+
contents: read
24+
25+
with:
26+
repo: core
27+
28+
# Options
29+
minimum-base-package: true
30+
test-py2: true
31+
secrets: inherit
32+
33+
submit-traces:
34+
needs:
35+
- test
36+
if: success() || failure()
37+
38+
uses: ./.github/workflows/submit-traces.yml
39+
secrets: inherit
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
name: PR All Windows
2+
# This is a temporary fix to avoid hitting the max 256 jobs per workflow limit
3+
# We will remove this once we have a better solution
4+
5+
on:
6+
pull_request:
7+
paths:
8+
- datadog_checks_base/datadog_checks/**
9+
- datadog_checks_dev/datadog_checks/dev/*.py
10+
- ddev/src/**
11+
- "!agent_requirements.in"
12+
13+
concurrency:
14+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.head_ref }}
15+
cancel-in-progress: true
16+
17+
jobs:
18+
test:
19+
uses: ./.github/workflows/test-all-windows.yml
20+
21+
permissions:
22+
# needed for compute-matrix in test-target.yml
23+
contents: read
24+
25+
with:
26+
repo: core
27+
28+
# Options
29+
test-py2: true
30+
secrets: inherit
31+
32+
save-event:
33+
needs:
34+
- test
35+
if: success() || failure()
36+
37+
uses: ./.github/workflows/save-event.yml
38+
39+
upload-coverage:
40+
needs:
41+
- test
42+
if: >
43+
!github.event.repository.private &&
44+
(success() || failure())
45+
runs-on: ubuntu-latest
46+
permissions:
47+
# needed for codecov, allows the action to get a JWT signed by Github
48+
id-token: write
49+
contents: read
50+
51+
steps:
52+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
53+
54+
- name: Download all coverage artifacts
55+
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
56+
with:
57+
pattern: coverage-*
58+
path: coverage-reports
59+
merge-multiple: false
60+
61+
- name: Upload coverage to Codecov
62+
uses: codecov/codecov-action@15559ed290fa727036809b67ab0f646ffa6c5158
63+
with:
64+
use_oidc: true
65+
directory: coverage-reports
66+
fail_ci_if_error: false
67+
68+
submit-traces:
69+
needs:
70+
- test
71+
if: success() || failure()
72+
73+
uses: ./.github/workflows/submit-traces.yml
74+
secrets: inherit
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: Test Agent release Windows
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
test-py3:
7+
required: false
8+
description: Run Python 3 tests
9+
default: true
10+
type: boolean
11+
agent-image:
12+
required: false
13+
description: Agent 7 image
14+
default: "datadog/agent:7-rc"
15+
type: string
16+
agent-image-windows:
17+
required: false
18+
description: Agent 7 image on Windows
19+
default: "datadog/agent:7-rc-servercore"
20+
type: string
21+
test-py2:
22+
required: false
23+
description: Run Python 2 tests
24+
default: true
25+
type: boolean
26+
agent-image-py2:
27+
required: false
28+
description: Agent 6 image
29+
default: "datadog/agent:6-rc"
30+
type: string
31+
agent-image-windows-py2:
32+
required: false
33+
description: Agent 6 image on Windows
34+
default: "datadog/agent-dev:master-py2-win-servercore"
35+
type: string
36+
37+
jobs:
38+
test:
39+
uses: ./.github/workflows/test-all-windows.yml
40+
with:
41+
repo: core
42+
43+
# Options
44+
test-py2: ${{ inputs.test-py2 }}
45+
test-py3: ${{ inputs.test-py3 }}
46+
agent-image: "${{ inputs.agent-image }}"
47+
agent-image-py2: "${{ inputs.agent-image-py2 }}"
48+
agent-image-windows: "${{ inputs.agent-image-windows }}"
49+
agent-image-windows-py2: "${{ inputs.agent-image-windows-py2 }}"
50+
skip-ddev-tests: true
51+
secrets: inherit
52+
permissions:
53+
# needed for codecov in test-target.yml, allows the action to get a JWT signed by Github
54+
id-token: write
55+
# needed for compute-matrix in test-target.yml
56+
contents: read
57+
58+
submit-traces:
59+
needs:
60+
- test
61+
if: success() || failure()
62+
63+
uses: ./.github/workflows/submit-traces.yml
64+
secrets: inherit

0 commit comments

Comments
 (0)