Skip to content

Commit

Permalink
Add coverage report to build
Browse files Browse the repository at this point in the history
Squashed commit of the following: 059f3d5..9cda893
  • Loading branch information
smoynes committed Oct 18, 2023
1 parent dd4ac22 commit 32c4a06
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 6 deletions.
28 changes: 26 additions & 2 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,32 @@ jobs:
- name: Install test runner
run: go install gotest.tools/gotestsum@latest

- name: Test
run: gotestsum -f github-actions ./...
- name: Tests
run: |
gotestsum -f github-actions ./...
coverage:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: stable

- name: Coverage
run: |
go test \
-coverprofile cover.out \
-covermode count \
-coverpkg ./... \
-shuffle on \
./...
- name: Report
run: go tool cover -func=cover.out

build-release:
runs-on: ubuntu-latest
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ a.o
*.orig
*.tmp
*~
/cover.out
2 changes: 1 addition & 1 deletion docs/COUNTDOWN.asm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
;;; countdown.asm : a program for a tutorial that counts down to blast off
;;; COUNTDOWN.asm : a program for a tutorial that counts down to blast off
;;; Inputs: R0 is the address of counter.

.ORIG x3000 ; Start at the beginning of user-space memory.
Expand Down
6 changes: 3 additions & 3 deletions docs/TUTORIAL.md
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ create machine code from source. In this directory you will find an assembly
program. To translate the source to an object file containing machine code, run:

```console
$ elsie asm countdown.asm
$ elsie asm COUNTDOWN.asm
```

Well, that isn't satisfying, but no output means success in this case.
Expand All @@ -354,7 +354,7 @@ Options:
```

```console
$ elsie asm -debug countdown.asm
$ elsie asm -debug COUNTDOWN.asm
TIMESTAMP : 2023-10-11T11:51:30-04:00
LEVEL : DEBUG
SOURCE : asm.go:66
Expand Down Expand Up @@ -398,7 +398,7 @@ Before running the countdown program, let's take a look at the source code to
get an idea what it is going to do.

```
;;; countdown.asm : a program for a tutorial that counts down to blast off
;;; COUNTDOWN.asm : a program for a tutorial that counts down to blast off
;;; Inputs: R0 is the address of counter.
.ORIG x3000 ; Start at the beginning of user-space memory.
Expand Down

0 comments on commit 32c4a06

Please sign in to comment.