Skip to content

protocol/multiple-go-modules

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 

Repository files navigation

GitHub Action: multiple-go-modules

Go allows a Git repository to contain multiple Go modules (i.e. multiple directory trees that have their own go.mod file). When running Go tools like go test ./... or go vet ./... from the parent directory, it will only recurse into directories belonging to the same Go module. In order to run the command in all subdirectories, no matter which module they belong to, the command has to be invoked separately for every Go module.

This GitHub Action makes it easy to do this.

Usage

Take the following example, running a command (or multiple commands) directly:

steps:
  - name: Code Quality Checks
    run: go vet ./...

Using this action, this would run the same command(s) in all Go modules:

steps:
  - name: Code Quality Checks
    uses: protocol/multiple-go-modules@master
    with:
      run: go vet ./...

Optionally, the working directory can be specified, analagously to the working-directory option on run:

steps:
  - name: Code Quality Checks
    uses: protocol/multiple-go-modules@master
    with:
      working-directory: scripts
      run: go vet ./...

About

No description, website, or topics provided.

Resources

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Packages

No packages published