Skip to content

Commit e461939

Browse files
committed
chore: pre-release
0 parents  commit e461939

132 files changed

Lines changed: 239601 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/dependabot.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# See https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
2+
3+
version: 2
4+
updates:
5+
- package-ecosystem: 'npm'
6+
directory: '/'
7+
schedule:
8+
interval: 'weekly'
9+
commit-message:
10+
prefix: 'chore'
11+
prefix-development: 'chore'
12+
include: 'scope'

.github/workflows/ci.yml

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
concurrency:
10+
group: ci-${{ github.ref }}
11+
cancel-in-progress: true
12+
13+
jobs:
14+
build:
15+
runs-on: ubuntu-latest
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
node-version: [22.x, 24.x]
20+
21+
steps:
22+
- uses: actions/checkout@v4
23+
24+
- name: Setup Node.js
25+
uses: actions/setup-node@v4
26+
with:
27+
node-version: ${{ matrix.node-version }}
28+
cache: 'npm'
29+
30+
- name: Install dependencies
31+
run: npm ci
32+
33+
- name: Build
34+
run: npm run build:all
35+
36+
- name: Verify dist is up to date
37+
run: git diff --exit-code -- dist
38+
39+
- name: Generate self-test workflows
40+
run: npm run generate:self-test
41+
42+
- name: Verify self-test workflows are up to date
43+
run: git diff --exit-code -- .github/workflows/self-test.yml .github/workflows/realistic-test.yml scripts/self-test-manifest.json
44+
45+
- name: Typecheck
46+
run: npm run typecheck
47+
48+
- name: Lint
49+
run: npm run lint
50+
51+
- name: Test (unit)
52+
run: npm run test:coverage
53+
54+
node-20:
55+
runs-on: ubuntu-latest
56+
steps:
57+
- uses: actions/checkout@v4
58+
59+
- name: Setup Node.js
60+
uses: actions/setup-node@v4
61+
with:
62+
node-version: 20.x
63+
cache: 'npm'
64+
65+
- name: Install dependencies
66+
run: npm ci
67+
68+
- name: Build
69+
run: npm run build:all
70+
71+
- name: Verify dist is up to date
72+
run: git diff --exit-code -- dist
73+
74+
- name: Generate self-test workflows
75+
run: npm run generate:self-test
76+
77+
- name: Verify self-test workflows are up to date
78+
run: git diff --exit-code -- .github/workflows/self-test.yml .github/workflows/realistic-test.yml scripts/self-test-manifest.json
79+
80+
- name: Typecheck
81+
run: npm run typecheck
82+
83+
- name: Lint
84+
run: npm run lint
85+
86+
- name: Test (unit + integration)
87+
run: npm run test:all
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
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+
diagnostics: true
34+
artifact_name: github-api-usage-monitor-${{ matrix.id }}
35+
36+
- name: Run scenario
37+
env:
38+
TOKEN: ${{ secrets.GITHUB_TOKEN }}
39+
REPO: ${{ github.repository }}
40+
SCENARIO_ID: ${{ matrix.id }}
41+
run: node scripts/run-scenario.mjs
42+
43+
realistic-diag:
44+
name: Diagnostics — ${{ matrix.name }}
45+
runs-on: ubuntu-latest
46+
needs: [realistic]
47+
if: ${{ needs.realistic.result != 'skipped' }}
48+
strategy:
49+
max-parallel: 1
50+
fail-fast: false
51+
matrix:
52+
include:
53+
- id: realistic-5m
54+
name: "Realistic mix — 5m steady traffic"
55+
has_expected: false
56+
steps:
57+
- uses: actions/checkout@v4
58+
59+
- name: Download diagnostics artifacts
60+
uses: actions/download-artifact@v6
61+
with:
62+
name: github-api-usage-monitor-${{ matrix.id }}
63+
path: ${{ runner.temp }}/github-api-usage-monitor-artifacts/${{ matrix.id }}
64+
65+
- name: Render diagnostics
66+
env:
67+
STATE_DIR: ${{ runner.temp }}/github-api-usage-monitor-artifacts/${{ matrix.id }}
68+
SCENARIO_NAME: ${{ matrix.name }}
69+
run: node scripts/render-diagnostics.mjs >> "$GITHUB_STEP_SUMMARY"
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Release Please
2+
3+
on:
4+
push:
5+
branches: [main]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: write
10+
pull-requests: write
11+
12+
jobs:
13+
release-please:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
with:
19+
fetch-depth: 0
20+
- name: Run Release Please
21+
uses: googleapis/release-please-action@16a9c90856f42705d54a6fda1823352bdc62cf38
22+
with:
23+
config-file: release-please-config.json
24+
manifest-file: .release-please-manifest.json

0 commit comments

Comments
 (0)