Skip to content

Commit 03d0d2e

Browse files
committed
wip: testing
1 parent 4aa161f commit 03d0d2e

12 files changed

+13279
-2
lines changed

.github/workflows/test.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,7 @@ jobs:
2222
filters: |
2323
^check.*
2424
^test.*
25-
- name: Show output
26-
run: echo "${{ steps.discovery.outputs.result }}"
25+
- name: Run
26+
uses: ./forge/actions/run
27+
with:
28+
path: ./forge/cli+test

forge/actions/run/.node-version

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
20.14.0

forge/actions/run/README.md

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Discover Action
2+
3+
The discover action acts as a wrapper over the `forge scan` command from the Forge CLI.
4+
It provides inputs that map to their respective flags.
5+
The result from running the command is returned in the `result` output.
6+
By default, the `--enumerate` flag is passed as this is usually the desired output format in CI.
7+
8+
For more information on the `scan` command, refer to the Forge CLI documentation.
9+
10+
## Usage
11+
12+
```yaml
13+
name: Run Setup
14+
on:
15+
push:
16+
17+
permissions:
18+
contents: read
19+
id-token: write
20+
21+
jobs:
22+
setup:
23+
runs-on: ubuntu-latest
24+
steps:
25+
- name: Setup
26+
uses: input-output-hk/catalyst-forge/forge/actions/setup@master
27+
- name: Discover
28+
id: discovery
29+
uses: input-output-hk/catalyst-forge/forge/actions/discover@master
30+
with:
31+
filters: |
32+
^check.*
33+
^test.*
34+
- name: Show result
35+
run: echo "${{ steps.discovery.outputs.result }}
36+
```
37+
38+
## Inputs
39+
40+
| Name | Description | Required | Default |
41+
| --------- | --------------------------------------------- | -------- | --------- |
42+
| absolute | Output absolute paths | No | `"false"` |
43+
| enumerate | Enumerate results into Earthfile+Target pairs | No | `"true"` |
44+
| filters | A newline separated list of filters to apply | No | `""` |
45+
| path | The path to search from | No | `"."` |

forge/actions/run/action.yml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Run
2+
description: Execute Earthfiles
3+
inputs:
4+
artifact:
5+
description: Enable artifact collection
6+
default: "false"
7+
local:
8+
description: Forces the target to run locally (ignores satellite).
9+
default: "false"
10+
path:
11+
description: The path to the Earthfile, including target (i.e. path/to/project+target)
12+
required: true
13+
outputs:
14+
result:
15+
description: The result of the run
16+
17+
runs:
18+
using: node20
19+
main: dist/index.js

0 commit comments

Comments
 (0)