opg-sirius-workflow

command module
v1.192.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 30, 2024 License: MIT Imports: 22 Imported by: 0

README

OPG SIRIUS WORKFLOW

Major dependencies
Installing dependencies locally:

(This is only necessary if dunning without docker)

  • yarn install
  • go mod download

Local development

The application ran through Docker can be accessed on localhost:8888/supervision/workflow/.

Note: Sirius is required to be running in order to authenticate. However, it also runs its own version of Workflow on port 8080. Ensure that after logging in, you redirect back to the correct port (8888)

To enable debugging and hot-reloading of Go files:

make dev-up

If you are using VSCode, you can then attach a remote debugger on port 2345. The same is also possible in Goland. You will then be able to use breakpoints to stop and inspect the application.

Additionally, hot-reloading is provided by Air, so any changes to the Go code (including templates) will rebuild and restart the application without requiring manually stopping and restarting the compose stack.

Without docker

Alternatively to set it up not using Docker use below. This hosts it on localhost:1234

  • yarn install && yarn build
  • go build main.go
  • ./main
Enabling code completion in .gotmpl files in GoLand

Go to Settings -> Editor -> File Types -> Go template files in your IDE and add *.gotmpl to the list of file name patterns.

Define the type of {{ . }} in the context of your template by adding a line like this at the top of the template: {{- /*gotype: github.com/ministryofjustice/opg-sirius-workflow/internal/server.WorkflowVars*/ -}}


Run Cypress tests

make cypress

To see the UI output you can still run

make up && yarn cypress


Run the unit/functional tests

make unit-test


Run Trivy scanning

make scan

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL