Skip to content

Commit 0019c79

Browse files
Run only non-flaky tests in master (#17910)
- Create a workflow for running only flaky tests - Update ddev validate ci to accept pytest-args for integrations-core - Configure different args for unit/integration and e2e tests
1 parent 5c29ac6 commit 0019c79

File tree

6 files changed

+274
-5
lines changed

6 files changed

+274
-5
lines changed

.github/workflows/flaky-tests.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Daily Flaky Tests (every 8 hours)
2+
3+
on:
4+
schedule:
5+
# 4 AM, 12 PM, 8 PM UTC
6+
- cron: "0 4,12,20 * * *"
7+
8+
jobs:
9+
cache:
10+
uses: ./.github/workflows/cache-shared-deps.yml
11+
12+
test:
13+
needs:
14+
- cache
15+
16+
uses: ./.github/workflows/test-all.yml
17+
with:
18+
repo: core
19+
20+
# Options
21+
standard: true
22+
# Because -m starts with a dash,
23+
# click (the library used to build the CLI) will
24+
# interpret it as an option, not as an argument.
25+
# To avoid this, using -- syntax,
26+
# which tells the command that everything following it
27+
# should be treated as positional arguments, not options
28+
pytest-args: '-m flaky'
29+
secrets: inherit
30+
31+
publish-test-results:
32+
needs:
33+
- test
34+
if: success() || failure()
35+
concurrency:
36+
group: test-results
37+
38+
uses: ./.github/workflows/test-results-master.yml
39+
secrets: inherit
40+
41+
submit-traces:
42+
needs:
43+
- test
44+
if: success() || failure()
45+
46+
uses: ./.github/workflows/submit-traces.yml
47+
secrets: inherit

.github/workflows/master.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,13 @@ jobs:
1919

2020
# Options
2121
standard: true
22+
# Because -m starts with a dash,
23+
# click (the library used to build the CLI) will
24+
# interpret it as an option, not as an argument.
25+
# To avoid this, using -- syntax,
26+
# which tells the command that everything following it
27+
# should be treated as positional arguments, not options
28+
pytest-args: '-m "not flaky"'
2229
secrets: inherit
2330

2431
publish-test-results:

.github/workflows/pr-test.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ on:
1515
required: false
1616
default: ""
1717
type: string
18+
pytest-args:
19+
description: "Arguments to pass to pytest"
20+
required: false
21+
type: string
22+
default: ""
1823

1924
jobs:
2025
compute-matrix:
@@ -47,6 +52,7 @@ jobs:
4752
# For other repositories
4853
setup-env-vars: "${{ inputs.setup-env-vars }}"
4954
python-version: "${{ inputs.python-version }}"
55+
pytest-args: ${{ inputs.pytest-args }}
5056
secrets: inherit
5157

5258
save-event:

0 commit comments

Comments
 (0)