Compare commits
No commits in common. "b2ce85b1460aa97a8cad66056b9c19f6d300f62e" and "71d62ecaf6f5388c287191d9fdcf9fa394858377" have entirely different histories.
b2ce85b146
...
71d62ecaf6
4 changed files with 9 additions and 82 deletions
|
@ -1,37 +0,0 @@
|
||||||
---
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
types:
|
|
||||||
- opened
|
|
||||||
- reopened
|
|
||||||
- synchronize
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
test:
|
|
||||||
runs-on: docker
|
|
||||||
env:
|
|
||||||
SPRUCE_TEST_VERBOSE: "1"
|
|
||||||
SPRUCE_TEST_COVER: "1"
|
|
||||||
steps:
|
|
||||||
- name: Checkout Repository
|
|
||||||
uses: https://code.forgejo.org/actions/checkout@v3
|
|
||||||
- name: Setup Go
|
|
||||||
uses: https://code.forgejo.org/actions/setup-go@v4
|
|
||||||
with:
|
|
||||||
go-version: '1.21'
|
|
||||||
- name: Test
|
|
||||||
run: go run magefiles/main.go -v test
|
|
||||||
|
|
||||||
lint:
|
|
||||||
runs-on: docker
|
|
||||||
steps:
|
|
||||||
- name: Checkout Repository
|
|
||||||
uses: https://code.forgejo.org/actions/checkout@v3
|
|
||||||
- name: Setup Go
|
|
||||||
uses: https://code.forgejo.org/actions/setup-go@v4
|
|
||||||
with:
|
|
||||||
go-version: '1.21'
|
|
||||||
- name: Lint
|
|
||||||
uses: https://github.com/golangci/golangci-lint-action@v3
|
|
||||||
with:
|
|
||||||
version: v1.54
|
|
|
@ -110,24 +110,20 @@ Run `spruce` to verify your installation. You should see the usage printed onto
|
||||||
[source,console]
|
[source,console]
|
||||||
----
|
----
|
||||||
$ spruce
|
$ spruce
|
||||||
SUMMARY:
|
A tool for building CVs
|
||||||
spruce - A command-line tool for building CVs
|
|
||||||
|
|
||||||
VERSION:
|
Usage:
|
||||||
v0.3.0
|
|
||||||
|
|
||||||
USAGE:
|
|
||||||
spruce [flags]
|
spruce [flags]
|
||||||
spruce [command]
|
spruce [command]
|
||||||
|
|
||||||
COMMANDS:
|
Available Commands:
|
||||||
create creates a new CV JSON file
|
create create a new CV JSON file
|
||||||
generate generates a PDF file from an existing CV JSON file
|
generate generate a PDF file from an existing CV JSON file
|
||||||
version print the application's version and build information
|
version print the application's build information
|
||||||
|
|
||||||
FLAGS:
|
Flags:
|
||||||
-help, --help
|
-h, --help
|
||||||
print the help message
|
print the help message for spruce
|
||||||
|
|
||||||
Use "spruce [command] --help" for more information about a command.
|
Use "spruce [command] --help" for more information about a command.
|
||||||
----
|
----
|
||||||
|
|
|
@ -19,25 +19,6 @@ var (
|
||||||
defaultInstallPrefix = "/usr/local"
|
defaultInstallPrefix = "/usr/local"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Test run the go tests.
|
|
||||||
// To enable verbose mode set SPRUCE_TEST_VERBOSE=1.
|
|
||||||
// To enable coverage mode set SPRUCE_TEST_COVER=1.
|
|
||||||
func Test() error {
|
|
||||||
goTest := sh.RunCmd("go", "test")
|
|
||||||
|
|
||||||
args := []string{"./..."}
|
|
||||||
|
|
||||||
if os.Getenv("SPRUCE_TEST_VERBOSE") == "1" {
|
|
||||||
args = append(args, "-v")
|
|
||||||
}
|
|
||||||
|
|
||||||
if os.Getenv("SPRUCE_TEST_COVER") == "1" {
|
|
||||||
args = append(args, "-cover")
|
|
||||||
}
|
|
||||||
|
|
||||||
return goTest(args...)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Lint runs golangci-lint against the code.
|
// Lint runs golangci-lint against the code.
|
||||||
func Lint() error {
|
func Lint() error {
|
||||||
return sh.RunV("golangci-lint", "run", "--color", "always")
|
return sh.RunV("golangci-lint", "run", "--color", "always")
|
||||||
|
|
|
@ -1,13 +0,0 @@
|
||||||
//go:build ignore
|
|
||||||
|
|
||||||
package main
|
|
||||||
|
|
||||||
import (
|
|
||||||
"os"
|
|
||||||
|
|
||||||
"github.com/magefile/mage/mage"
|
|
||||||
)
|
|
||||||
|
|
||||||
func main() {
|
|
||||||
os.Exit(mage.Main())
|
|
||||||
}
|
|
Loading…
Reference in a new issue