Skip to content

Commit

Permalink
Add GitHub actions and CI badge to README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
mfridman committed Dec 24, 2024
1 parent c3aed9a commit e8ce38e
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 2 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: CI

on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened]

jobs:
build:
name: Build and test
runs-on: ubuntu-latest
strategy:
matrix:
# go-version: ['oldstable', 'stable', '1.23.0-rc.2']
go-version: ["oldstable", "stable"]
env:
VERBOSE: 1

steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- name: Install tparse
run: go install github.com/mfridman/tparse@main
- name: Build
run: go build -v .
- name: Run tests
shell: bash
run: |
go test $(go list ./... | grep -v 'examples') -count=1 -v -json -cover \
| tparse -all -follow -sort=elapsed -trimpath=auto
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# cli

[![GoDoc](https://godoc.org/github.com/mfridman/cli?status.svg)](https://godoc.org/github.com/mfridman/cli)
[![Go Report
Card](https://goreportcard.com/badge/github.com/mfridman/cli)](https://goreportcard.com/report/github.com/mfridman/cli)
[![Go Report Card](https://goreportcard.com/badge/github.com/mfridman/cli)](https://goreportcard.com/report/github.com/mfridman/cli)
[![Actions](https://github.com/mfridman/cli/workflows/ci/badge.svg)](https://github.com/mfridman/cli)

A lightweight framework for building Go CLI applications with nested subcommands.

Expand Down

0 comments on commit e8ce38e

Please sign in to comment.