simulci 0.0.0-stage → 0.1.0

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.
Files changed (4) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +31 -2
  3. package/dist/index.js +32416 -0
  4. package/package.json +38 -4
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Ruman Kazi
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,32 @@
1
- # Temporary Holding Version
1
+ # simulci
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ A static simulator and test framework for GitHub Actions workflows. Give it your workflow files and a scenario (the
4
+ event, the ref, the changed files, inputs, variables), and it tells you which jobs and steps run, skip or might run,
5
+ and why. Nothing executes.
6
+
7
+ ```sh
8
+ npx simulci plan --event pull_request --base main --head feat/x --changed src/a.ts
9
+ npx simulci plan --event push --branch main --as-test steps > .github/simulci/tests/ci.test.yml
10
+ npx simulci test
11
+ ```
12
+
13
+ Route tests live in `.github/simulci/tests/*.test.yml`:
14
+
15
+ ```yaml
16
+ workflow: ci.yml
17
+ cases:
18
+ - name: a docs-only push starts nothing
19
+ when: { event: push, branch: main, changed: [docs/a.md] }
20
+ then: { because: paths }
21
+ - name: a pull request runs the tests but never deploys
22
+ when: { event: pull_request, base: main, head: feat/x, changed: [src/a.ts] }
23
+ then:
24
+ run: [test]
25
+ skip:
26
+ - deploy: if
27
+ ```
28
+
29
+ `simulci test` exits 0, 1 when a case fails, 2 when a file is invalid; in GitHub Actions it annotates the test line
30
+ and the workflow line that decided. The same engine runs as the `ciatlas/simulci` action.
31
+
32
+ Documentation and source: https://github.com/ciatlas/simulci