Skip to content

Commit 7e6e289

Browse files
committed
wip
1 parent 008c4cb commit 7e6e289

13 files changed

Lines changed: 1125 additions & 1676 deletions
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# AUTO-GENERATED by scripts/generate-self-test.ts — do not edit manually
2+
# Regenerate: npx tsx scripts/generate-self-test.ts
3+
4+
name: Realistic Test
5+
6+
on:
7+
workflow_dispatch:
8+
9+
concurrency:
10+
group: realistic-test
11+
cancel-in-progress: true
12+
13+
jobs:
14+
realistic:
15+
name: Realistic — ${{ matrix.name }}
16+
runs-on: ubuntu-latest
17+
strategy:
18+
max-parallel: 1
19+
fail-fast: false
20+
matrix:
21+
include:
22+
- id: realistic-5m
23+
name: "Realistic mix — 5m steady traffic"
24+
has_expected: false
25+
steps:
26+
- uses: actions/checkout@v4
27+
28+
- name: Start monitor
29+
id: monitor
30+
uses: hesreallyhim/github-api-usage-monitor@main
31+
with:
32+
token: ${{ secrets.GITHUB_TOKEN }}
33+
artifact_name: github-api-usage-monitor-${{ matrix.id }}
34+
35+
- name: Run scenario
36+
env:
37+
TOKEN: ${{ secrets.GITHUB_TOKEN }}
38+
REPO: ${{ github.repository }}
39+
SCENARIO_ID: ${{ matrix.id }}
40+
run: node scripts/run-scenario.mjs
41+
42+
realistic-diag:
43+
name: Diagnostics — ${{ matrix.name }}
44+
runs-on: ubuntu-latest
45+
needs: [realistic]
46+
if: ${{ needs.realistic.result != 'skipped' }}
47+
strategy:
48+
max-parallel: 1
49+
fail-fast: false
50+
matrix:
51+
include:
52+
- id: realistic-5m
53+
name: "Realistic mix — 5m steady traffic"
54+
has_expected: false
55+
steps:
56+
- uses: actions/checkout@v4
57+
58+
- name: Download diagnostics artifacts
59+
uses: actions/download-artifact@v6
60+
with:
61+
name: github-api-usage-monitor-${{ matrix.id }}
62+
path: ${{ runner.temp }}/github-api-usage-monitor-artifacts/${{ matrix.id }}
63+
64+
- name: Render diagnostics
65+
env:
66+
STATE_DIR: ${{ runner.temp }}/github-api-usage-monitor-artifacts/${{ matrix.id }}
67+
SCENARIO_NAME: ${{ matrix.name }}
68+
run: node scripts/render-diagnostics.mjs >> "$GITHUB_STEP_SUMMARY"

0 commit comments

Comments
 (0)