-
Notifications
You must be signed in to change notification settings - Fork 1.5k
107 lines (92 loc) · 2.93 KB
/
Copy pathmaster.yml
File metadata and controls
107 lines (92 loc) · 2.93 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
name: Master
on:
push:
branches:
- master
paths:
# List of files/paths that should trigger the run. The intention is to avoid running all tests if the commit only includes changes on assets or README
- "*/datadog_checks/**"
- "*/tests/**"
- "ddev/**"
- "datadog_checks_base/**"
- "datadog_checks_dev/**"
# Contains overrides for testing
- ".ddev/**"
# Want to ensure any change in workflows is validated
- ".github/workflows/**"
# Test matrices and dependencies
- "*/hatch.toml"
- "*/pyproject.toml"
# Some integrations might use this file to validate metrics emission
- "*/metadata.csv"
# In case some linting formatting config has changed
- "pyproject.toml"
schedule:
- cron: "0 2 * * *"
jobs:
cache:
uses: ./.github/workflows/cache-shared-deps.yml
test:
needs:
- cache
uses: ./.github/workflows/test-all.yml
with:
repo: core
# Options
# Because -m starts with a dash,
# click (the library used to build the CLI) will
# interpret it as an option, not as an argument.
# To avoid this, using -- syntax,
# which tells the command that everything following it
# should be treated as positional arguments, not options
pytest-args: '-m "not flaky"'
secrets: inherit
permissions:
# needed for compute-matrix in test-target.yml
contents: read
publish-test-results:
needs:
- test
if: success() || failure()
concurrency:
group: test-results
permissions:
checks: write
pull-requests: write
contents: write
uses: ./.github/workflows/test-results-master.yml
secrets: inherit
upload-coverage:
needs:
- test
if: >
!github.event.repository.private &&
(success() || failure())
runs-on: ubuntu-latest
permissions:
contents: read
# needed for dd-sts
id-token: write
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Get Datadog credentials
id: dd-sts
# Coverage upload is optional; keep non-blocking so fork PRs and OIDC outages don't fail the job
continue-on-error: true
uses: DataDog/dd-sts-action@2e8187910199bd93129520183c093e19aa585c75 # v1.0.0
with:
policy: integrations-coverage-api-key
- name: Download all coverage artifacts
uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v8.0.0
with:
pattern: coverage-*
path: coverage-reports
merge-multiple: false
- name: Upload coverage to Datadog
if: always()
continue-on-error: true
uses: DataDog/coverage-upload-github-action@6c4bd935248daa6f0ef94e3e6ba71ad5ad079998 # v1.0.3
with:
api_key: ${{ steps.dd-sts.outputs.api_key }}
files: coverage-reports
format: cobertura