Skip to content

Commit

Permalink
docs: add documentation to run workflows locally
Browse files Browse the repository at this point in the history
  • Loading branch information
tom-rm-meyer-ISST committed Jun 20, 2024
1 parent 8263810 commit 5968e3b
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .act/pr_event.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"repository": {
"default_branch": "main"
}
}
20 changes: 20 additions & 0 deletions docs/DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,26 @@ docker exec -it {container-id} crictl rmi puris-backend:dev
docker exec -it {container-id} crictl rmi puris-frontend:dev
```

## Testing Workflows locally

[act](https://github.com/nektos/act) is a tool to run jobs within `./workflows` locally. Configuration of events can
be stored in `./act`

Install by downloading the released binaries and add them to your path.

```shell
cd <root dir of repo>

act --list
>> Stage Job ID Job name Workflow name Workflow file Events
>> 0 check-dependencies-backend check-dependencies-backend 3rd Party Dependency Check (Eclipse Dash Tool) dash-dependency-check.yml workflow_dispatch,pull_request
>> 0 check-dependencies-frontend check-dependencies-frontend 3rd Party Dependency Check (Eclipse Dash Tool) dash-dependency-check.yml workflow_dispatch,pull_request
>> 0 lint-test lint-test Lint and Test Charts helm-test.yml pull_request,workflow_dispatch

# run action with job-id lint-test for event as defined in pr-event.json
act --job lint-test -e .act/pr-event.json
```

## NOTICE

This work is licensed under the [Apache-2.0](https://www.apache.org/licenses/LICENSE-2.0).
Expand Down

0 comments on commit 5968e3b

Please sign in to comment.