This repository was archived by the owner on Mar 23, 2026. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
120 lines (108 loc) · 4.66 KB
/
marker-report.yml
File metadata and controls
120 lines (108 loc) · 4.66 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
108
109
110
111
112
113
114
115
116
117
118
119
120
name: Generate pytest marker report / Open marker report GH issue
on:
workflow_dispatch:
inputs:
dryRun:
description: 'Execute a Dry-Run? A Dry-Run will not create any issues and only print the issue content in the logs instead'
required: false
type: boolean
default: false
updateExistingIssue:
description: 'Select the empty string "" to open duplicate issues, "true" to update duplicate issues and "false" to skip duplicate issues'
required: false
type: choice
default: ''
options:
- ''
- 'false'
- 'true'
createIssue:
description: 'Open marker report github issue'
required: false
type: boolean
default: false
push:
paths:
- "tests/**"
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
marker-report:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Set up Python
id: setup-python
uses: actions/setup-python@v6
with:
python-version-file: '.python-version'
- name: Cache LocalStack community dependencies (venv)
uses: actions/cache@v5
with:
path: .venv
key: ${{ runner.os }}-python-${{ steps.setup-python.outputs.python-version }}-venv-${{ hashFiles('requirements-dev.txt') }}
- name: Install dependencies
run: make install-dev
- name: Collect marker report
if: ${{ !inputs.createIssue }}
env:
PYTEST_ADDOPTS: "-p no:localstack.testing.pytest.fixtures -p no:localstack_snapshot.pytest.snapshot -p no:localstack.testing.pytest.filters -p no:localstack.testing.pytest.fixture_conflicts -p no:tests.fixtures -p no:localstack.testing.pytest.stepfunctions.fixtures -p no:localstack.testing.pytest.cloudformation.fixtures -s --co --disable-warnings --marker-report --marker-report-tinybird-upload"
MARKER_REPORT_PROJECT_NAME: localstack
MARKER_REPORT_TINYBIRD_TOKEN: ${{ secrets.MARKER_REPORT_TINYBIRD_TOKEN }}
MARKER_REPORT_COMMIT_SHA: ${{ github.sha }}
run: |
. ./.venv/bin/activate
python -m pytest tests/aws/
# makes use of the marker report plugin localstack.testing.pytest.marker_report
- name: Generate marker report
env:
PYTEST_ADDOPTS: "-p no:localstack.testing.pytest.fixtures -p no:localstack_snapshot.pytest.snapshot -p no:localstack.testing.pytest.filters -p no:localstack.testing.pytest.fixture_conflicts -p no:tests.fixtures -p no:localstack.testing.pytest.stepfunctions.fixtures -p no:localstack.testing.pytest.cloudformation.fixtures -p no: -s --co --disable-warnings --marker-report --marker-report-path './target'"
MARKER_REPORT_PROJECT_NAME: localstack
MARKER_REPORT_COMMIT_SHA: ${{ github.sha }}
run: |
. ./.venv/bin/activate
pip install codeowners
python -m pytest tests/aws/
mv ./target/marker-report*.json ./target/marker-report.json
- name: Enrich and render marker report
if: ${{ inputs.createIssue }}
env:
MARKER_REPORT_PATH: ./target/marker-report.json
CODEOWNERS_PATH: ./CODEOWNERS
TEMPLATE_PATH: ./.github/bot_templates/MARKER_REPORT_ISSUE.md.j2
OUTPUT_PATH: ./target/MARKER_REPORT_ISSUE.md
GITHUB_REPO: ${{ github.repository }}
COMMIT_SHA: ${{ github.sha }}
run: |
. ./.venv/bin/activate
pip install codeowners
python scripts/render_marker_report.py
- name: Print generated markdown
if: ${{ inputs.createIssue }}
run: |
cat ./target/MARKER_REPORT_ISSUE.md
- name: Upload generated markdown
if: ${{ inputs.createIssue }}
uses: actions/upload-artifact@v7
with:
path: ./target/MARKER_REPORT_ISSUE.md
- name: Create GH issue from template
if: inputs.dryRun != true && inputs.createIssue == true
uses: JasonEtco/create-an-issue@v2
env:
GITHUB_TOKEN: ${{ secrets.PRO_ACCESS_TOKEN }}
with:
# `update_existing` actually has 3 possible values:
# 1. not set => will always open duplicates
# 2. false => will not update and will not open duplicates (NOOP if title conflict detected)
# 3. true => will update an existing one if conflict detected
update_existing: ${{ inputs.updateExistingIssue || '' }}
# search_existing: open
filename: ./target/MARKER_REPORT_ISSUE.md