github.com/abemedia/go-don@v0.2.2-0.20240329015135-be88e32bb73b/Taskfile.yml (about)

     1  # https://taskfile.dev
     2  
     3  version: '3'
     4  
     5  tasks:
     6    default:
     7      desc: Runs the default tasks
     8      cmds:
     9        - task: init
    10        - task: mod
    11        - task: lint
    12        - task: test
    13  
    14    init:
    15      desc: Setup git hooks
    16      cmds:
    17        - cp -f scripts/pre-commit.sh .git/hooks/pre-commit
    18  
    19    mod:
    20      desc: Download Go modules
    21      cmds:
    22        - go mod tidy
    23        - cd benchmarks && go mod tidy
    24  
    25    lint:
    26      desc: Runs golangci-lint
    27      aliases: [l]
    28      sources:
    29        - ./**/*.go
    30        - .golangci.yml
    31      cmds:
    32        - golangci-lint run --fix
    33  
    34    test:
    35      desc: Runs test suite
    36      aliases: [t]
    37      cmds:
    38        - go test -cover ./...
    39  
    40    benchmark:
    41      desc: Runs benchmarks
    42      aliases: [b]
    43      dir: benchmarks
    44      cmds:
    45        - go test -bench=. -benchmem .