Skip to content

Commit

Permalink
wip: testing
Browse files Browse the repository at this point in the history
  • Loading branch information
jmgilman committed Aug 30, 2024
1 parent 4aa161f commit 03d0d2e
Show file tree
Hide file tree
Showing 12 changed files with 13,279 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,7 @@ jobs:
filters: |
^check.*
^test.*
- name: Show output
run: echo "${{ steps.discovery.outputs.result }}"
- name: Run
uses: ./forge/actions/run
with:
path: ./forge/cli+test
1 change: 1 addition & 0 deletions forge/actions/run/.node-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
20.14.0
45 changes: 45 additions & 0 deletions forge/actions/run/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Discover Action

The discover action acts as a wrapper over the `forge scan` command from the Forge CLI.
It provides inputs that map to their respective flags.
The result from running the command is returned in the `result` output.
By default, the `--enumerate` flag is passed as this is usually the desired output format in CI.

For more information on the `scan` command, refer to the Forge CLI documentation.

## Usage

```yaml
name: Run Setup
on:
push:

permissions:
contents: read
id-token: write

jobs:
setup:
runs-on: ubuntu-latest
steps:
- name: Setup
uses: input-output-hk/catalyst-forge/forge/actions/setup@master
- name: Discover
id: discovery
uses: input-output-hk/catalyst-forge/forge/actions/discover@master
with:
filters: |
^check.*
^test.*
- name: Show result
run: echo "${{ steps.discovery.outputs.result }}
```
## Inputs
| Name | Description | Required | Default |
| --------- | --------------------------------------------- | -------- | --------- |
| absolute | Output absolute paths | No | `"false"` |
| enumerate | Enumerate results into Earthfile+Target pairs | No | `"true"` |
| filters | A newline separated list of filters to apply | No | `""` |
| path | The path to search from | No | `"."` |
19 changes: 19 additions & 0 deletions forge/actions/run/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Run
description: Execute Earthfiles
inputs:
artifact:
description: Enable artifact collection
default: "false"
local:
description: Forces the target to run locally (ignores satellite).
default: "false"
path:
description: The path to the Earthfile, including target (i.e. path/to/project+target)
required: true
outputs:
result:
description: The result of the run

runs:
using: node20
main: dist/index.js
Loading

0 comments on commit 03d0d2e

Please sign in to comment.