You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+14-11Lines changed: 14 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,11 @@
1
1
# Assert
2
2
3
3
A GitHub Action for asserting **actual** is **expected** in GitHub Workflows.
4
-
Designed for GitHub Action integration tests and build pipelines.
4
+
Designed for GitHub Action integration tests and robust build pipelines.
5
5
6
6
* Cast action input values from strings to `type` for type safety
7
-
* Add custom Javascript assertions to your project to meet unique testing requirements
7
+
* Distribute reusable assertions via [npm][npm]
8
+
* Write local Javascript assertions to meet project-specific testing needs
8
9
* Run tests against multiple values using `each`
9
10
10
11
```yaml
@@ -13,10 +14,10 @@ jobs:
13
14
runs-on: ubuntu-latest
14
15
steps:
15
16
- name: Test actor is @shrink
16
-
uses: pr-mpt/actions-assert@v1
17
+
uses: pr-mpt/actions-assert@v2
17
18
with:
18
19
assertion: npm://@assertions/is-equal
19
-
actual: ${{ github.actor }}
20
+
actual: "${{ github.actor }}"
20
21
expected: shrink
21
22
```
22
23
@@ -26,11 +27,12 @@ jobs:
26
27
27
28
| Name | Description | Default | Examples |
28
29
| :--- | :---------- | :------ | :------- |
29
-
| **`assertion`** | **Reference to a supported [assertion](#assertions)** | | **`npm://@assertions/is-equal`** |
30
-
| **`actual`** | **Dynamic value to perform test on** | | **`${{steps.m.outputs.greeting}}`** |
31
-
| `expected` | Value that `actual` should match | | `Hello, World!` |
30
+
| **`assertion`** | **Reference to a supported [assertion](#assertions)** in `source://name` format | | **`npm://@assertions/is-equal`**<br/>**`local://is-even`** |
31
+
| `expected` | Value the assertion is looking for | | `Hello, World!` |
32
+
| `actual` | Value the assertion will test against the expected value | | `${{steps.fields.outputs.greeting}}` |
32
33
| `type` | A supported [data type](#data-types) that `actual` and `expected` will be cast to before performing assertion | `string` | `string` `json` `number` |
33
34
| `each` | Parse multi-line `actual` into many values and test each | `false` | `true` `false` |
0 commit comments