@codyswann/lisa 1.12.0 → 1.12.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/all/copy-overwrite/.claude/commands/git/commit.md +1 -1
- package/cdk/package-lisa/package.lisa.json +3 -3
- package/dist/strategies/package-lisa.d.ts +5 -4
- package/dist/strategies/package-lisa.d.ts.map +1 -1
- package/dist/strategies/package-lisa.js +8 -6
- package/dist/strategies/package-lisa.js.map +1 -1
- package/package.json +2 -2
- package/typescript/package-lisa/package.lisa.json +1 -1
- package/nestjs/copy-overwrite/.github/workflows/k6-load-test-README.md +0 -230
- /package/typescript/copy-overwrite/.github/{README.md → GITHUB_ACTIONS.md} +0 -0
|
@@ -39,7 +39,7 @@ Create conventional commits for current changes. Optional hint: $ARGUMENTS
|
|
|
39
39
|
- attempt to bypass tests or quality checks
|
|
40
40
|
- skip tests or quality checks
|
|
41
41
|
- stash changes - ALL changes must be committed
|
|
42
|
-
- skip or exclude any files from the commit
|
|
42
|
+
- skip or exclude any files from the commit - even if they're unrelated
|
|
43
43
|
- leave uncommitted changes in the working directory
|
|
44
44
|
- ask the user which files to commit - commit everything
|
|
45
45
|
|
|
@@ -2,18 +2,18 @@
|
|
|
2
2
|
"force": {
|
|
3
3
|
"scripts": {
|
|
4
4
|
"watch": "tsc -w",
|
|
5
|
-
"cdk": "cdk"
|
|
5
|
+
"cdk": "cdk",
|
|
6
|
+
"build": "tsc --noEmit"
|
|
6
7
|
},
|
|
7
8
|
"dependencies": {
|
|
8
9
|
"@aws-cdk/aws-amplify-alpha": "^2.235.0-alpha.0",
|
|
9
10
|
"aws-cdk-github-oidc": "^2.4.1",
|
|
10
11
|
"aws-cdk-lib": "2.235.0",
|
|
11
12
|
"constructs": "^10.4.5",
|
|
12
|
-
"lodash": "^4.17.21",
|
|
13
13
|
"source-map-support": "^0.5.21"
|
|
14
14
|
},
|
|
15
15
|
"devDependencies": {
|
|
16
|
-
"aws-cdk": "2.
|
|
16
|
+
"aws-cdk": "^2.1104.0"
|
|
17
17
|
},
|
|
18
18
|
"bin": {
|
|
19
19
|
"infrastructure": "bin/infrastructure.js"
|
|
@@ -119,13 +119,14 @@ export declare class PackageLisaStrategy implements ICopyStrategy {
|
|
|
119
119
|
*/
|
|
120
120
|
private loadAndMergeTemplates;
|
|
121
121
|
/**
|
|
122
|
-
* Expand project types to include parent types
|
|
122
|
+
* Expand project types to include parent types, sorted by hierarchy order
|
|
123
123
|
* @remarks
|
|
124
124
|
* Type hierarchy: expo/nestjs/cdk/npm-package inherit from typescript
|
|
125
|
-
* This expands a list to include parents
|
|
126
|
-
*
|
|
125
|
+
* This expands a list to include parents and sorts by PROJECT_TYPE_ORDER
|
|
126
|
+
* so parents are processed before children (enabling child overrides).
|
|
127
|
+
* Example: [cdk] → [typescript, cdk]
|
|
127
128
|
* @param types - Project types detected
|
|
128
|
-
* @returns Expanded types including parents
|
|
129
|
+
* @returns Expanded types including parents, sorted parents-first
|
|
129
130
|
* @private
|
|
130
131
|
*/
|
|
131
132
|
private expandTypeHierarchy;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"package-lisa.d.ts","sourceRoot":"","sources":["../../src/strategies/package-lisa.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAe,MAAM,mBAAmB,CAAC;AAE1E,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAc9E;;;;;;;;;;;;;;;;GAgBG;AAEH;;;;;;GAMG;AACH,qBAAa,mBAAoB,YAAW,aAAa;IACvD,QAAQ,CAAC,IAAI,EAAG,cAAc,CAAU;IAExC,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAkB;IAC/C,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAmB;IACjD,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAc;IACvC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAc;IACvC,OAAO,CAAC,QAAQ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AM,EACpB,OAAO,EAAE,eAAe,GACvB,OAAO,CAAC,mBAAmB,CAAC;IA6C/B;;;;;;;;OAQG;YACW,iBAAiB;IAc/B;;;;;;;;OAQG;YACW,iBAAiB;IA4B/B;;;;;;OAMG;YACW,gBAAgB;IAsB9B;;;;;;OAMG;YACW,kBAAkB;IA8ChC;;;;;;OAMG;YACW,iBAAiB;IAW/B;;;;;;OAMG;YACW,uBAAuB;IAWrC;;;;;;OAMG;YACW,gBAAgB;IAW9B;;;;;;;;;OASG;YACW,qBAAqB;IAwCnC;;;;;;;;;;OAUG;IACH,OAAO,CAAC,mBAAmB;IAgB3B;;;;;;;;OAQG;IACH,OAAO,CAAC,cAAc;IAWtB;;;;;;;OAOG;IACH,OAAO,CAAC,kBAAkB;IAmB1B;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,aAAa;IAoBrB;;;;;;;OAOG;IACH,OAAO,CAAC,kBAAkB;IAsB1B;;;;;;;;OAQG;IACH,OAAO,CAAC,iBAAiB;CA2B1B"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as fse from "fs-extra";
|
|
2
2
|
import path from "node:path";
|
|
3
|
-
import { PROJECT_TYPE_HIERARCHY } from "../core/config.js";
|
|
3
|
+
import { PROJECT_TYPE_HIERARCHY, PROJECT_TYPE_ORDER } from "../core/config.js";
|
|
4
4
|
import { ensureParentDir } from "../utils/file-operations.js";
|
|
5
5
|
import { readJson, writeJson, deepMerge, readJsonOrNull, } from "../utils/json-utils.js";
|
|
6
6
|
import { JsonMergeError } from "../errors/index.js";
|
|
@@ -257,13 +257,14 @@ export class PackageLisaStrategy {
|
|
|
257
257
|
return accumulator;
|
|
258
258
|
}
|
|
259
259
|
/**
|
|
260
|
-
* Expand project types to include parent types
|
|
260
|
+
* Expand project types to include parent types, sorted by hierarchy order
|
|
261
261
|
* @remarks
|
|
262
262
|
* Type hierarchy: expo/nestjs/cdk/npm-package inherit from typescript
|
|
263
|
-
* This expands a list to include parents
|
|
264
|
-
*
|
|
263
|
+
* This expands a list to include parents and sorts by PROJECT_TYPE_ORDER
|
|
264
|
+
* so parents are processed before children (enabling child overrides).
|
|
265
|
+
* Example: [cdk] → [typescript, cdk]
|
|
265
266
|
* @param types - Project types detected
|
|
266
|
-
* @returns Expanded types including parents
|
|
267
|
+
* @returns Expanded types including parents, sorted parents-first
|
|
267
268
|
* @private
|
|
268
269
|
*/
|
|
269
270
|
expandTypeHierarchy(types) {
|
|
@@ -274,7 +275,8 @@ export class PackageLisaStrategy {
|
|
|
274
275
|
allTypes.add(parent);
|
|
275
276
|
}
|
|
276
277
|
}
|
|
277
|
-
|
|
278
|
+
// Sort by PROJECT_TYPE_ORDER to ensure parents are processed before children
|
|
279
|
+
return Array.from(allTypes).sort((a, b) => PROJECT_TYPE_ORDER.indexOf(a) - PROJECT_TYPE_ORDER.indexOf(b));
|
|
278
280
|
}
|
|
279
281
|
/**
|
|
280
282
|
* Merge two template objects
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"package-lisa.js","sourceRoot":"","sources":["../../src/strategies/package-lisa.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,UAAU,CAAC;AAChC,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"package-lisa.js","sourceRoot":"","sources":["../../src/strategies/package-lisa.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,UAAU,CAAC;AAChC,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAE/E,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EACL,QAAQ,EACR,SAAS,EACT,SAAS,EACT,cAAc,GACf,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,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CAAC,CAAC;QAChE,CAAC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC;IAED;;;;;;;;OAQG;IACK,iBAAiB,CACvB,SAAoB,EACpB,YAAuB;QAEvB,MAAM,IAAI,GAAG,IAAI,GAAG,EAAU,CAAC;QAC/B,MAAM,MAAM,GAAc,EAAE,CAAC;QAE7B,uBAAuB;QACvB,KAAK,MAAM,IAAI,IAAI,SAAS,EAAE,CAAC;YAC7B,MAAM,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;YACjC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC;gBACnB,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;gBACd,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACpB,CAAC;QACH,CAAC;QAED,6BAA6B;QAC7B,KAAK,MAAM,IAAI,IAAI,YAAY,EAAE,CAAC;YAChC,MAAM,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;YACjC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC;gBACnB,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;gBACd,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACpB,CAAC;QACH,CAAC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC;CACF"}
|
package/package.json
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"knip:fix": "knip --fix",
|
|
19
19
|
"sg:scan": "ast-grep scan",
|
|
20
20
|
"build": "tsc",
|
|
21
|
-
"prepare": "
|
|
21
|
+
"prepare": "$npm_execpath run build || husky install || true",
|
|
22
22
|
"lisa:update": "npx @codyswann/lisa@latest .",
|
|
23
23
|
"start": "node dist/index.js",
|
|
24
24
|
"dev": "tsx src/index.ts",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
},
|
|
75
75
|
"resolutions": {},
|
|
76
76
|
"name": "@codyswann/lisa",
|
|
77
|
-
"version": "1.12.
|
|
77
|
+
"version": "1.12.2",
|
|
78
78
|
"description": "Claude Code governance framework that applies guardrails, guidance, and automated enforcement to projects",
|
|
79
79
|
"main": "dist/index.js",
|
|
80
80
|
"bin": {
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"knip:fix": "knip --fix",
|
|
16
16
|
"sg:scan": "ast-grep scan",
|
|
17
17
|
"build": "tsc",
|
|
18
|
-
"prepare": "
|
|
18
|
+
"prepare": "$npm_execpath run build || husky install || true",
|
|
19
19
|
"lisa:update": "npx @codyswann/lisa@latest ."
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
@@ -1,230 +0,0 @@
|
|
|
1
|
-
# K6 Load Testing Workflow
|
|
2
|
-
|
|
3
|
-
## Overview
|
|
4
|
-
|
|
5
|
-
The `k6-load-test.yml` is a reusable GitHub Actions workflow designed to run k6 performance tests as part of your CI/CD pipeline. It supports multiple test scenarios, flexible configuration, and both local and cloud execution.
|
|
6
|
-
|
|
7
|
-
## Quick Start
|
|
8
|
-
|
|
9
|
-
```yaml
|
|
10
|
-
name: Deploy and Test
|
|
11
|
-
on:
|
|
12
|
-
push:
|
|
13
|
-
branches: [main]
|
|
14
|
-
|
|
15
|
-
jobs:
|
|
16
|
-
deploy:
|
|
17
|
-
# Your deployment steps
|
|
18
|
-
|
|
19
|
-
performance-test:
|
|
20
|
-
needs: deploy
|
|
21
|
-
uses: ./.github/workflows/k6-load-test.yml
|
|
22
|
-
with:
|
|
23
|
-
environment: production
|
|
24
|
-
test_scenario: smoke
|
|
25
|
-
base_url: https://api.example.com
|
|
26
|
-
secrets: inherit
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
## Workflow Inputs
|
|
30
|
-
|
|
31
|
-
| Input | Type | Required | Default | Description |
|
|
32
|
-
|-------|------|----------|---------|-------------|
|
|
33
|
-
| `environment` | string | Yes | - | Target environment (staging, production) |
|
|
34
|
-
| `test_scenario` | string | No | smoke | Test type: smoke, load, stress, spike, soak |
|
|
35
|
-
| `base_url` | string | Yes | - | Base URL of application to test |
|
|
36
|
-
| `k6_version` | string | No | latest | k6 version to use |
|
|
37
|
-
| `test_duration` | string | No | - | Override test duration (e.g., 5m, 1h) |
|
|
38
|
-
| `virtual_users` | number | No | - | Override number of virtual users |
|
|
39
|
-
| `thresholds_config` | string | No | - | Path to custom thresholds JSON |
|
|
40
|
-
| `test_script` | string | No | .github/k6/scripts/default-test.js | Path to k6 test script |
|
|
41
|
-
| `fail_on_threshold` | boolean | No | true | Fail workflow if thresholds not met |
|
|
42
|
-
| `upload_results` | boolean | No | true | Upload test results as artifacts |
|
|
43
|
-
| `cloud_run` | boolean | No | false | Run tests on k6 Cloud |
|
|
44
|
-
|
|
45
|
-
## Workflow Outputs
|
|
46
|
-
|
|
47
|
-
| Output | Description |
|
|
48
|
-
|--------|-------------|
|
|
49
|
-
| `test_passed` | Whether the test passed all thresholds (true/false) |
|
|
50
|
-
| `results_url` | URL to test results artifact |
|
|
51
|
-
| `summary` | Test execution summary |
|
|
52
|
-
|
|
53
|
-
## Workflow Secrets
|
|
54
|
-
|
|
55
|
-
| Secret | Required | Description |
|
|
56
|
-
|--------|----------|-------------|
|
|
57
|
-
| `K6_CLOUD_TOKEN` | No | k6 Cloud API token for cloud runs |
|
|
58
|
-
| `CUSTOM_HEADERS` | No | Custom headers for authenticated endpoints (JSON) |
|
|
59
|
-
|
|
60
|
-
## Test Scenarios
|
|
61
|
-
|
|
62
|
-
### Available Scenarios
|
|
63
|
-
|
|
64
|
-
- **smoke**: Quick validation (1 min, 1 VU)
|
|
65
|
-
- **load**: Normal traffic (9 min, 10 VUs)
|
|
66
|
-
- **stress**: Find breaking points (33 min, up to 200 VUs)
|
|
67
|
-
- **spike**: Sudden traffic changes (8 min, 5→100→5 VUs)
|
|
68
|
-
- **soak**: Extended duration (30+ min, 10 VUs)
|
|
69
|
-
|
|
70
|
-
### Selecting a Scenario
|
|
71
|
-
|
|
72
|
-
See the [Scenario Selection Guide](../k6/SCENARIO_SELECTION_GUIDE.md) for detailed guidance.
|
|
73
|
-
|
|
74
|
-
## Authentication
|
|
75
|
-
|
|
76
|
-
For testing protected endpoints:
|
|
77
|
-
|
|
78
|
-
```yaml
|
|
79
|
-
uses: ./.github/workflows/k6-load-test.yml
|
|
80
|
-
with:
|
|
81
|
-
base_url: https://api.example.com
|
|
82
|
-
secrets:
|
|
83
|
-
CUSTOM_HEADERS: |
|
|
84
|
-
{
|
|
85
|
-
"Authorization": "Bearer ${{ secrets.API_TOKEN }}",
|
|
86
|
-
"X-API-Key": "${{ secrets.API_KEY }}"
|
|
87
|
-
}
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
## Custom Test Scripts
|
|
91
|
-
|
|
92
|
-
Use your own test script:
|
|
93
|
-
|
|
94
|
-
```yaml
|
|
95
|
-
with:
|
|
96
|
-
test_script: .github/k6/scripts/my-custom-test.js
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
## Custom Thresholds
|
|
100
|
-
|
|
101
|
-
Use environment-specific thresholds:
|
|
102
|
-
|
|
103
|
-
```yaml
|
|
104
|
-
with:
|
|
105
|
-
thresholds_config: .github/k6/thresholds/production.json
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
## k6 Cloud Integration
|
|
109
|
-
|
|
110
|
-
For high-concurrency tests:
|
|
111
|
-
|
|
112
|
-
```yaml
|
|
113
|
-
uses: ./.github/workflows/k6-load-test.yml
|
|
114
|
-
with:
|
|
115
|
-
cloud_run: true
|
|
116
|
-
secrets:
|
|
117
|
-
K6_CLOUD_TOKEN: ${{ secrets.K6_CLOUD_TOKEN }}
|
|
118
|
-
```
|
|
119
|
-
|
|
120
|
-
## Artifacts
|
|
121
|
-
|
|
122
|
-
Test results are automatically uploaded as artifacts including:
|
|
123
|
-
- JSON results (`results.json`)
|
|
124
|
-
- CSV results (`results.csv`)
|
|
125
|
-
- HTML report (`report.html`)
|
|
126
|
-
- Scenario-specific summaries
|
|
127
|
-
|
|
128
|
-
Artifacts are retained for 30 days.
|
|
129
|
-
|
|
130
|
-
## Error Handling
|
|
131
|
-
|
|
132
|
-
The workflow handles various error scenarios:
|
|
133
|
-
- Base URL not accessible
|
|
134
|
-
- Test script not found
|
|
135
|
-
- Threshold failures
|
|
136
|
-
- k6 installation issues
|
|
137
|
-
|
|
138
|
-
See the [Troubleshooting Guide](../k6/INTEGRATION_GUIDE.md#troubleshooting) for solutions.
|
|
139
|
-
|
|
140
|
-
## Integration Patterns
|
|
141
|
-
|
|
142
|
-
For comprehensive integration examples, see the [Integration Guide](../k6/INTEGRATION_GUIDE.md).
|
|
143
|
-
|
|
144
|
-
### Integration with Release and Deployment Workflows
|
|
145
|
-
|
|
146
|
-
The k6 load testing workflow is designed to integrate seamlessly with your release and deployment processes. Here's the recommended pattern:
|
|
147
|
-
|
|
148
|
-
```yaml
|
|
149
|
-
# deploy.yml.example - Complete release and deployment with load testing
|
|
150
|
-
name: 🚀 Release and Deploy
|
|
151
|
-
|
|
152
|
-
on:
|
|
153
|
-
push:
|
|
154
|
-
branches: [main, staging, dev]
|
|
155
|
-
|
|
156
|
-
jobs:
|
|
157
|
-
# Step 1: Create a release
|
|
158
|
-
release:
|
|
159
|
-
uses: ./.github/workflows/release.yml
|
|
160
|
-
with:
|
|
161
|
-
environment: ${{ github.ref_name }}
|
|
162
|
-
# ... other inputs
|
|
163
|
-
|
|
164
|
-
# Step 2: Deploy to your infrastructure
|
|
165
|
-
deploy:
|
|
166
|
-
needs: release
|
|
167
|
-
runs-on: ubuntu-latest
|
|
168
|
-
outputs:
|
|
169
|
-
environment_url: ${{ steps.deploy.outputs.environment_url }}
|
|
170
|
-
steps:
|
|
171
|
-
# Your deployment logic here
|
|
172
|
-
|
|
173
|
-
# Step 3: Run load tests (staging only)
|
|
174
|
-
load_testing:
|
|
175
|
-
needs: [release, deploy]
|
|
176
|
-
if: |
|
|
177
|
-
needs.deploy.result == 'success' &&
|
|
178
|
-
github.ref_name == 'staging'
|
|
179
|
-
uses: ./.github/workflows/load-test.yml
|
|
180
|
-
with:
|
|
181
|
-
environment: staging
|
|
182
|
-
test_scenario: smoke
|
|
183
|
-
base_url: ${{ needs.deploy.outputs.environment_url }}
|
|
184
|
-
fail_on_threshold: false # Don't fail the deployment
|
|
185
|
-
secrets: inherit
|
|
186
|
-
```
|
|
187
|
-
|
|
188
|
-
This pattern ensures:
|
|
189
|
-
- Releases are created first with proper versioning
|
|
190
|
-
- Deployments happen after successful releases
|
|
191
|
-
- Load tests run automatically for staging deployments
|
|
192
|
-
- Production deployments skip load testing (run manually if needed)
|
|
193
|
-
|
|
194
|
-
## File Structure
|
|
195
|
-
|
|
196
|
-
```
|
|
197
|
-
.github/
|
|
198
|
-
├── workflows/
|
|
199
|
-
│ └── k6-load-test.yml # This workflow
|
|
200
|
-
└── k6/
|
|
201
|
-
├── scripts/ # Test scripts
|
|
202
|
-
├── scenarios/ # Scenario configs
|
|
203
|
-
├── thresholds/ # Threshold configs
|
|
204
|
-
└── examples/ # Usage examples
|
|
205
|
-
```
|
|
206
|
-
|
|
207
|
-
## Workflow Steps
|
|
208
|
-
|
|
209
|
-
1. **Checkout**: Get repository code
|
|
210
|
-
2. **Setup k6**: Install specified k6 version
|
|
211
|
-
3. **Prepare Environment**: Set up test variables
|
|
212
|
-
4. **Run Test**: Execute k6 with parameters
|
|
213
|
-
5. **Generate Summary**: Create test report
|
|
214
|
-
6. **Upload Results**: Store artifacts
|
|
215
|
-
7. **Comment on PR**: Add results to PR (if applicable)
|
|
216
|
-
|
|
217
|
-
## Best Practices
|
|
218
|
-
|
|
219
|
-
1. Start with smoke tests
|
|
220
|
-
2. Use appropriate scenarios per environment
|
|
221
|
-
3. Set realistic thresholds
|
|
222
|
-
4. Monitor resource usage during tests
|
|
223
|
-
5. Review results regularly
|
|
224
|
-
6. Update tests as application evolves
|
|
225
|
-
|
|
226
|
-
## Support
|
|
227
|
-
|
|
228
|
-
- [k6 Documentation](https://k6.io/docs/)
|
|
229
|
-
- [GitHub Actions Documentation](https://docs.github.com/en/actions)
|
|
230
|
-
- Project-specific guides in `.github/k6/`
|
|
File without changes
|