-
Notifications
You must be signed in to change notification settings - Fork 1.5k
85 lines (72 loc) · 2.37 KB
/
pr-all.yml
File metadata and controls
85 lines (72 loc) · 2.37 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
name: PR All
on:
pull_request:
paths:
- datadog_checks_base/datadog_checks/**
- datadog_checks_base/pyproject.toml
- datadog_checks_dev/datadog_checks/dev/*.py
- datadog_checks_dev/pyproject.toml
- ddev/src/**
- ddev/pyproject.toml
- "!agent_requirements.in"
# Also run if we modify the workflow files
- '.github/workflows/pr-all.yml'
- '.github/workflows/test-target.yml'
- '.github/workflows/test-all.yml'
# Also run if the action to install test-target scripts changes
- '.github/actions/setup-test-target-scripts/**'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.head_ref }}
cancel-in-progress: true
jobs:
test:
uses: ./.github/workflows/test-all.yml
permissions:
# needed for compute-matrix in test-target.yml
contents: read
with:
repo: core
context: "pr"
# Avoid running flaky tests since the intention of running everything in these
# prs is to ensure that tests can be run sucessfully. Reporting failed flaky tests
# does not provide much value.
pytest-args: '-m "not flaky"'
secrets: inherit
save-event:
needs:
- test
if: success() || failure()
uses: ./.github/workflows/save-event.yml
upload-coverage:
needs:
- test
if: >
!github.event.repository.private &&
(success() || failure())
runs-on: ubuntu-latest
permissions:
# needed for codecov, allows the action to get a JWT signed by Github
id-token: write
contents: read
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- 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 Codecov
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de
with:
use_oidc: true
directory: coverage-reports
fail_ci_if_error: false
- name: Upload coverage to Datadog
if: always()
continue-on-error: true
uses: DataDog/coverage-upload-github-action@9bbbf86d16f7db1b14c5b885e61cf0d96053686a # v1.0.0
with:
api_key: ${{ secrets.DD_API_KEY }}
files: coverage-reports
format: cobertura