Skip to content

Commit

Permalink
Fix status badge stuck on "Passing", hiding CI failures
Browse files Browse the repository at this point in the history
  • Loading branch information
dmullis committed Jun 16, 2024
1 parent a914513 commit 0f1da5f
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 292 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/test.yml → .github/workflows/make.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
name: Test
name: Make

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
build:
strategy:
matrix:
go-version: '1.20'
go-version: [1.21.x]
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
Expand All @@ -19,5 +19,5 @@ jobs:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v3
- name: Test
run: go test -race -v .
- name: Make
run: ./make.sh
270 changes: 0 additions & 270 deletions README.md

This file was deleted.

14 changes: 7 additions & 7 deletions README.md.tmpl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# GoAT: Go ASCII Tool

<!-- Github-specific status icons-->
![](https://github.com/github/docs/actions/workflows/test.yml/badge.svg)
<!-- Github-specific status icon -->
![](https://github.com/{{.GithubActor}}/goat/actions/workflows/make.yml/badge.svg)

## What **GoAT** Can Do For You

Expand Down Expand Up @@ -42,7 +42,7 @@ with rows above and below.

## Installation
```
$ go install github.com/{{.GithubUser}}/goat/cmd/goat@latest
$ go install github.com/{{.GithubActor}}/goat/cmd/goat@latest
```
<!-- https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/organizing-information-with-collapsed-sections#creating-a-collapsed-section -->

Expand Down Expand Up @@ -133,12 +133,12 @@ The core engine of ```goat``` is accessible as a Go library package, for inclusi
code of your own.
The code implements a subset, and some extensions, of the ASCII diagram generation function of the browser-side Javascript in [Markdeep](http://casual-effects.com/markdeep/).

A nicely formatted reference may be found at [pkg.go.dev](https://pkg.go.dev/github.com/{{.GithubUser}}/goat).
A nicely formatted reference may be found at [pkg.go.dev](https://pkg.go.dev/github.com/{{.GithubActor}}/goat).

### Installation

```
$ go get -u github.com/{{.GithubUser}}/goat/
$ go get -u github.com/{{.GithubActor}}/goat/
```
### Library Data Flow
![]({{.Root}}/goat.svg)
Expand All @@ -150,13 +150,13 @@ source file [./goat.go](./goat.go).

<!--
XX XX May need a Github Action to do this substitution at "push" time.
[![resource non-responsive](https://pkg.go.dev/badge/github.com/{{.GithubUser}}/goat)](https://pkg.go.dev/github.com/{{.GithubUser}}/goat)
[![resource non-responsive](https://pkg.go.dev/badge/github.com/{{.GithubActor}}/goat)](https://pkg.go.dev/github.com/{{.GithubActor}}/goat)
-->

<!--
The scraping of GitHub by godocs.io (see https://sr.ht) does NOT include README.md;
whereas Google's pkg.go.dev does do so, and apparently runs its own variant of GFM processing :-/
[![resource non-responsive](https://godocs.io/github.com/{{.GithubUser}}/goat?status.svg)](https://godocs.io/github.com/{{.GithubUser}}/goat)
[![resource non-responsive](https://godocs.io/github.com/{{.GithubActor}}/goat?status.svg)](https://godocs.io/github.com/{{.GithubActor}}/goat)
-->

### Project Tenets
Expand Down
18 changes: 8 additions & 10 deletions make.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@
# Certain output files should be committed to the SCM archive.
#
# Recall that an end-user eventually installing with 'go get ...'
# will trigger a compilation from source within the local environment.
# will trigger a compilation from source within the local environment,
# without help from this file.
# XX Give this file a more descriptive name.

set -e
set -x
usage () {
printf "%s\n\n" "$*"
printf "usage: %s [-g GitHub_Username] [-w]\n" ${0##*/}
printf "usage: %s [-w]\n" ${0##*/}
printf "\t%s\t%s\n" ""
printf "\t%s\t%s\n" "$*"
exit 1
Expand All @@ -22,27 +23,24 @@ svg_color_dark_scheme="#EEF"
svg_color_light_scheme="#011"
github_blue_color="#2F81F7"

# GOMOD=$(go env GOMOD)
# from_username=${GOMOD##*github.com/}
# githubuser=${from_username%%/*}
#
# X Is it acceptable to push to a PR branch files that refer to the owner's main branch?
githubuser=blampe
# Baseline case is run by Github Action, in which case GITHUB_ACTOR is defined by
# the environment.
# If running on local dev workstation, substitute in $USER instead.
: ${GITHUB_ACTOR:=$USER}

TEST_ARGS=

while getopts hg:iw flag
do
case $flag in
h) usage "";;
g) githubuser=${OPTARG};; # Override guess based on GOMOD
w) TEST_ARGS=${TEST_ARGS}" -write";;
\?) usage "unrecognized option flag";;
esac
done

tmpl_expand () {
go run ./cmd/tmpl-expand Root="." GithubUser=${githubuser} "$@"
go run ./cmd/tmpl-expand Root="." GithubActor=${GITHUB_ACTOR} "$@"
}

#tmpl_expand <go.tmpl.mod >go.mod
Expand Down

0 comments on commit 0f1da5f

Please sign in to comment.